Filters all data points in a series except for a specified number of points with the largest values.
Keeps only N top/bottom points of the series.
Syntax
Visual Basic (Usage) |
Copy Code |
Dim instance As DataManipulator
Dim pointCount As Integer
Dim inputSeries As Series
Dim outputSeries As Series
Dim usingValue As String
instance.FilterTopN(pointCount, inputSeries, outputSeries, usingValue)
|
Parameters
- pointCount
- The number of data points that the filtering operation will not remove (or mark as empty).
Number of top/bottom points to return.
- inputSeries
- Series object that is filtered.
Input series.
- outputSeries
- Series object that stores the remaining data points. If it does not exist an exception will be thrown.
Output series.
- usingValue
- The data point value that is examined (e.g. "X", "Y", "Y2", etc.).
Defines which value of the point use in comparison (X, Y, Y2, ...).
Example
The following sample code filters Series1, and only 10 data points that have the largest second Y-values are stored in Series2, which is the only displayed series. We will assume we are dealing with a bubble chart, that uses Y2 for its bubble sizes.
Visual Basic |
Copy Code |
Imports Dundas.Charting.WinControl ....
Chart1.DataManipulator.FilterTopN (10, Chart1.Series("Series1"), Chart1.Series("Series2"), "Y2")
Chart1.Series("Series1").ChartArea = ""
... |
C# |
Copy Code |
using Dundas.Charting.WinControl ....
// Filter out all points except the 10 data points with the largest Y2 values Chart1.DataManipulator.FilterTopN (10, Chart1.Series["Series1"], Chart1.Series["Series2"], "Y2"); // Do not display Series1 Chart1.Series("Series1").ChartArea = ""; ... |
Requirements
Target Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family, Windows Vista, Windows Server 2008 family
See Also