Filters all data points in a series except for a specified number of point's 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.WebControl<CRLF> ...<CRLF><CRLF>Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load<CRLF> <CRLF> |
C# |
Copy Code |
using Dundas.Charting.WebControl;<CRLF> ...<CRLF><CRLF>protected void Page_Load(object sender, System.EventArgs e)<CRLF>{<CRLF><CRLF> // Filter out all points except the 10 data points with the largest Y2 values<CRLF> Chart1.DataManipulator.FilterTopN (10, Chart1.Series["Series1"], Chart1.Series["Series2"], "Y2");<CRLF><CRLF> // Do not display Series1<CRLF> Chart1.Series["Series1"].ChartArea = "";<CRLF><CRLF>} |
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