Dundas Chart for Windows Forms
Filter(CompareMethod,Double,Series,Series,String) Method
See Also  Example Send comments on this topic.
DundasWinChart Assembly > Dundas.Charting.WinControl Namespace > DataManipulator Class > Filter Method : Filter(CompareMethod,Double,Series,Series,String) Method


compareMethod
A CompareMethod enumeration value that determines the comparison method for the filtering rule. Can be "less than", "equal to", etc. .
Value comparing method.
compareValue
The value of the filtering rule that the specified value of data points is compared to.
Value to compare with.
inputSeries
Series object that is filtered.
Input series.
outputSeries
Series object that stores the filtered data. If it does not exist an exception will be thrown.
Output series.
usingValue
The data point value that the filtering rule is applied to. Can be X, Y, Y2, Y3, etc. .
Defines which value of the point use in comparison (X, Y, Y2, ...).

Enterprise Edition Only Feature. Filters one or more series by applying a filtering rule to the specified value of the first series' data points.


Filters points by point values.

Syntax

Visual Basic (Declaration)  
Public Overloads Sub Filter( _
   ByVal compareMethod As CompareMethod, _
   ByVal compareValue As Double, _
   ByVal inputSeries As Series, _
   ByVal outputSeries As Series, _
   ByVal usingValue As String _
) 
Visual Basic (Usage) Copy Code
Dim instance As DataManipulator
Dim compareMethod As CompareMethod
Dim compareValue As Double
Dim inputSeries As Series
Dim outputSeries As Series
Dim usingValue As String
 
instance.Filter(compareMethod, compareValue, inputSeries, outputSeries, usingValue)
C#  
public void Filter( 
   CompareMethod compareMethod,
   double compareValue,
   Series inputSeries,
   Series outputSeries,
   string usingValue
)

Parameters

compareMethod
A CompareMethod enumeration value that determines the comparison method for the filtering rule. Can be "less than", "equal to", etc. .
Value comparing method.
compareValue
The value of the filtering rule that the specified value of data points is compared to.
Value to compare with.
inputSeries
Series object that is filtered.
Input series.
outputSeries
Series object that stores the filtered data. If it does not exist an exception will be thrown.
Output series.
usingValue
The data point value that the filtering rule is applied to. Can be X, Y, Y2, Y3, etc. .
Defines which value of the point use in comparison (X, Y, Y2, ...).

Example

The following sample filters out all data points in Series1 that have a second Y-value that is greater than 2.5. Filtered data is stored and displayed in Series2 (we do not display Series1). We will assume a bubble chart is being plotted (uses the second Y-value for the bubble sizes).
Visual Basic Copy Code
Imports Dundas.Charting.WinControl
...

' Apply filtering rule of ">2.5" to second Y value of data points
Chart1.DataManipulator.Filter(CompareMethod.More, 2.5, Chart1.Series("Series1"), Chart1.Series("Series2"), "Y2")

' Do not display Series1
Chart1.Series("Series1").ChartArea = ""

Remarks

This method filters data points by applying a filtering rule, which is composed of an operator and a value (e.g. "< 5", "= 2.7", etc.). Data points are filtered using the value of the points that is determined by the usingValue parameter. By default if points match this filtering rule they are deleted from the series.

If the specified output series has not been created and added to the SeriesCollection when this function call is made an exception will be thrown.

Filtered points can be either removed from a series (default) or displayed as empty points, depending on the FilterSetEmptyPoints value.

Points can also be marked as filtered if they DO NOT match filtering criteria (determined by the FilterMatchPoints value).

Filters are always applied to an entire series.

To filter data and only keep a specified number of highest or lowest values use the FilterTopN method instead.

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

© 2009 All Rights Reserved.