Dundas Chart for Windows Forms
Filter(CompareMethod,Double,String) Method
See Also  Example Send comments on this topic.
DundasWinChart Assembly > Dundas.Charting.WinControl Namespace > DataManipulator Class > Filter Method : Filter(CompareMethod,Double,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 first Y-value of data points is compared to.
Value to compare with.
inputSeriesNames
The name(s) of the series that will be filtered. For multiple series use a comma-separated list of names, and make sure that the series are aligned. An asterisk (*) may be used to filter all series in the series collection.
Comma separated input series names.

Enterprise Edition Only Feature. Filters one or more series by applying a filtering rule to the first Y-value of the first series' data points. The filtered Series object(s) are used to store the modified data.


Filters points by point values.

Syntax

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

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 first Y-value of data points is compared to.
Value to compare with.
inputSeriesNames
The name(s) of the series that will be filtered. For multiple series use a comma-separated list of names, and make sure that the series are aligned. An asterisk (*) may be used to filter all series in the series collection.
Comma separated input series names.

Example

The following sample filters out all data points in Series1 and Series2 where the first Y-value of points in Series1 is greater than 20.5. Note that these series must be aligned, otherwise an exception will be thrown.
Visual Basic Copy Code
Imports Dundas.Charting.WinControl
...

' Apply filtering rule of ">20.5" to first Y value of data points in Series1
Chart1.DataManipulator.Filter(CompareMethod.More, 20.5, "Series1,Series2")

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 first Y-value of the points, and by default if points match this filtering rule they are deleted from the series.

Filtering should only be applied to multiple series that are aligned, otherwise an exception will be thrown (for information concerning alignment of data see the Aligning Data topic). Note also that multiple series are filtered using the first Y-value from the FIRST specified series. If two series must be filtered independently call the Filter method twice using one series as a parameter.

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 other values of data points (e.g. the second Y-value, etc.) use one of the function definitions that has a usingValue parameter.

To filter data and preserve the original series use another definition of this function that uses an output series parameter.

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.