本文整理汇总了C#中Visifire.Charts.DataSeries.GetValue方法的典型用法代码示例。如果您正苦于以下问题:C# DataSeries.GetValue方法的具体用法?C# DataSeries.GetValue怎么用?C# DataSeries.GetValue使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Visifire.Charts.DataSeries
的用法示例。
在下文中一共展示了DataSeries.GetValue方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: LoadSeriesColorSet
internal void LoadSeriesColorSet(DataSeries dataSeries)
{
ColorSet colorSet4MultiSeries = null;
Boolean FLAG_UNIQUE_COLOR_4_EACH_DP = false; // Unique color for each DataPoint
Brush seriesColor = null;
if (dataSeries.RenderAs == RenderAs.CandleStick)
{
if (dataSeries.PriceUpColor == null)
{
dataSeries.IsNotificationEnable = false;
dataSeries.PriceUpColor = _financialColorSet.GetNewColorFromColorSet();
dataSeries.IsNotificationEnable = true;
}
}
else
{
colorSet4MultiSeries = _chartColorSet;
FLAG_UNIQUE_COLOR_4_EACH_DP = false;
if (!String.IsNullOrEmpty(dataSeries.ColorSet))
{
colorSet4MultiSeries = Chart.GetColorSetByName(dataSeries.ColorSet);
if (colorSet4MultiSeries == null)
throw new Exception("ColorSet named " + dataSeries.ColorSet + " is not found.");
FLAG_UNIQUE_COLOR_4_EACH_DP = true;
}
else if (colorSet4MultiSeries == null)
{
throw new Exception("ColorSet named " + Chart.ColorSet + " is not found.");
}
if (dataSeries.RenderAs == RenderAs.Area || dataSeries.RenderAs == RenderAs.StackedArea || dataSeries.RenderAs == RenderAs.StackedArea100)
{
seriesColor = colorSet4MultiSeries.GetNewColorFromColorSet();
Brush DataSeriesColor = dataSeries.GetValue(DataSeries.ColorProperty) as Brush;
if (DataSeriesColor == null)
{
dataSeries._internalColor = seriesColor;
}
else
dataSeries._internalColor = DataSeriesColor;
foreach (DataPoint dp in dataSeries.DataPoints)
{
dp.IsNotificationEnable = false;
Brush dPColor = dp.GetValue(DataPoint.ColorProperty) as Brush;
if (dPColor != null)
dp._internalColor = dPColor;
dp.IsNotificationEnable = true;
}
}
else
{
if (!FLAG_UNIQUE_COLOR_4_EACH_DP || dataSeries.RenderAs == RenderAs.Line)
seriesColor = colorSet4MultiSeries.GetNewColorFromColorSet();
foreach (DataPoint dp in dataSeries.DataPoints)
{
dp.IsNotificationEnable = false;
Brush dPColor = dp.GetValue(DataPoint.ColorProperty) as Brush;
Brush DataSeriesColor = dataSeries.GetValue(DataSeries.ColorProperty) as Brush;
if (dPColor == null)
{
// If unique color for each DataPoint
if (FLAG_UNIQUE_COLOR_4_EACH_DP)
{
if (DataSeriesColor == null)
{
dp._internalColor = colorSet4MultiSeries.GetNewColorFromColorSet();
if (dataSeries.RenderAs == RenderAs.Line)
dataSeries._internalColor = seriesColor;
else
dataSeries._internalColor = null;
}
else
dataSeries._internalColor = DataSeriesColor;
}
else
{
if (DataSeriesColor == null)
dataSeries._internalColor = seriesColor;
else
dataSeries._internalColor = DataSeriesColor;
dp.IsNotificationEnable = true;
//.........这里部分代码省略.........
示例2: GetOpacity4Radar
/// <summary>
/// Get Opacity for Radar
/// </summary>
/// <param name="series"></param>
/// <returns></returns>
private static Double GetOpacity4Radar(DataSeries series)
{
if (series.GetValue(DataSeries.OpacityProperty) == null)
return 0.65;
else
return (Double)series.Opacity;
}
示例3: LoadSeriesColorSet4SingleSeries
internal void LoadSeriesColorSet4SingleSeries(DataSeries dataSeries)
{
ColorSet colorSet = _chartColorSet;
if (dataSeries.RenderAs == RenderAs.CandleStick)
{
if (dataSeries.PriceUpColor == null)
{
dataSeries.IsNotificationEnable = false;
dataSeries.PriceUpColor = _financialColorSet.GetNewColorFromColorSet();
dataSeries.IsNotificationEnable = true;
}
}
else
{
if (!String.IsNullOrEmpty(dataSeries.ColorSet))
{
colorSet = Chart.GetColorSetByName(dataSeries.ColorSet);
if (colorSet == null)
throw new Exception("ColorSet named " + dataSeries.ColorSet + " is not found.");
}
else if (colorSet == null)
{
throw new Exception("ColorSet named " + Chart.ColorSet + " is not found.");
}
Brush seriesColor = dataSeries.GetValue(DataSeries.ColorProperty) as Brush;
if (!Chart.UniqueColors || dataSeries.RenderAs == RenderAs.Area || dataSeries.RenderAs == RenderAs.Line || dataSeries.RenderAs == RenderAs.StackedArea || dataSeries.RenderAs == RenderAs.StackedArea100)
{
if (seriesColor == null)
dataSeries._internalColor = colorSet.GetNewColorFromColorSet();
else
dataSeries._internalColor = seriesColor;
colorSet.ResetIndex();
foreach (DataPoint dp in dataSeries.DataPoints)
{
dp.IsNotificationEnable = false;
Brush dPColor = dp.GetValue(DataPoint.ColorProperty) as Brush;
if (dPColor == null)
if (!Chart.UniqueColors)
dp._internalColor = dataSeries._internalColor;
else if (seriesColor == null)
dp._internalColor = colorSet.GetNewColorFromColorSet();
else
dp._internalColor = seriesColor;
else
dp._internalColor = dPColor;
dp.IsNotificationEnable = true;
}
}
else
{
dataSeries._internalColor = null;
foreach (DataPoint dp in dataSeries.DataPoints)
{
dp.IsNotificationEnable = false;
Brush dPColor = dp.GetValue(DataPoint.ColorProperty) as Brush;
if (dPColor == null)
{
if (seriesColor == null)
dp._internalColor = colorSet.GetNewColorFromColorSet();
else
dp._internalColor = seriesColor;
}
else
dp._internalColor = dPColor;
dp.IsNotificationEnable = true;
}
}
}
}
示例4: SetColor4CircularSeries
private void SetColor4CircularSeries(DataSeries dataSeries, ColorSet colorSet4MultiSeries, Boolean isUniqueColor4EachDP)
{
if (dataSeries.Color == null)
{
Brush colorFromColorSet = colorSet4MultiSeries.GetNewColorFromColorSet();
Brush seriesColor = dataSeries.GetValue(DataSeries.ColorProperty) as Brush;
if (seriesColor == null)
dataSeries._internalColor = colorFromColorSet;
else
dataSeries._internalColor = seriesColor;
foreach (DataPoint dp in dataSeries.DataPoints)
{
dp.IsNotificationEnable = false;
Brush dPColor = dp.GetValue(DataPoint.ColorProperty) as Brush;
if (dPColor == null)
{
// If unique color for each DataPoint
if (isUniqueColor4EachDP)
{
if (seriesColor == null)
dp._internalColor = colorSet4MultiSeries.GetNewColorFromColorSet();
else
dp._internalColor = seriesColor;
}
else
{
if (seriesColor == null)
dataSeries._internalColor = colorFromColorSet;
else
dataSeries._internalColor = seriesColor;
dp.IsNotificationEnable = true;
break;
}
}
else
dp._internalColor = dPColor;
dp.IsNotificationEnable = true;
}
}
}