private void Button_Click(object sender, RoutedEventArgs e)
{
foreach (var series in chart.Series)
{
List<object> data;
if (series is FastLineBitmapSeries)
{
//You can get the corresponsing series datapoints using GetDataPoints method.
data = (series as FastLineBitmapSeries).GetDataPoints(primaryAxis.VisibleRange.Start, primaryAxis.VisibleRange.End, secondaryAxis.VisibleRange.Start, secondaryAxis.VisibleRange.End);
//You can get the visible datapoints count by using the list.
int dataCount = data.Count;
}
}
} |
private void Button_Click(object sender, RoutedEventArgs e)
{
int seriescount = 0;
foreach (var series in chart.Series)
{
List<object> data;
if (series is FastLineBitmapSeries)
{
data = (series as FastLineBitmapSeries).GetDataPoints(primaryAxis.VisibleRange.Start, primaryAxis.VisibleRange.End, secondaryAxis.VisibleRange.Start, secondaryAxis.VisibleRange.End);
int dataCount = data.Count;
seriescount = dataCount > 0 ? seriescount + 1 : seriescount;
}
}
Console.WriteLine("VisibleSeries count is " + seriescount.ToString());
} |
foreach (var series in chart.Series)
{
DoubleRange xAxisRange = primaryAxis.VisibleRange;
List<object> data;
if (series is FastLineBitmapSeries)
{
FastLineBitmapSeries fastLineBitmap = series as FastLineBitmapSeries;
DoubleRange yAxisRange = fastLineBitmap.YAxis.VisibleRange;
data = fastLineBitmap.GetDataPoints(xAxisRange.Start, xAxisRange.End, yAxisRange.Start, yAxisRange.End);
}
} |