Dundas Chart for ASP.NET
Filter(CompareMethod,Double,String,String,String) Method
See Also  Example Send comments on this topic.
Dundas.Charting.WebControl Namespace > DataManipulator Class > Filter Method : Filter(CompareMethod,Double,String,String,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 (in which case the outputSeriesName parameter must be empty).
Comma separated input series names.
outputSeriesNames
The name(s) of the series that store the filtered data. Make sure that the number of output series matches the number of input series, otherwise an exception will be thrown.
Comma separated output series names.
usingValue
The data point value (of the first series' data points) 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 inputSeriesNames As String, _
   ByVal outputSeriesNames As String, _
   ByVal usingValue As String _
) 
Visual Basic (Usage) Copy Code
Dim instance As DataManipulator
Dim compareMethod As CompareMethod
Dim compareValue As Double
Dim inputSeriesNames As String
Dim outputSeriesNames As String
Dim usingValue As String
 
instance.Filter(compareMethod, compareValue, inputSeriesNames, outputSeriesNames, usingValue)
C#  
public void Filter( 
   CompareMethod compareMethod,
   double compareValue,
   string inputSeriesNames,
   string outputSeriesNames,
   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 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 (in which case the outputSeriesName parameter must be empty).
Comma separated input series names.
outputSeriesNames
The name(s) of the series that store the filtered data. Make sure that the number of output series matches the number of input series, otherwise an exception will be thrown.
Comma separated output series names.
usingValue
The data point value (of the first series' data points) 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 and Series2 where the second Y-value of points in Series1 is greater than 2.5. Note that these series must be aligned, otherwise an exception will be thrown. The filtered data is stored and displayed in Series3 and Series4 (Series1 and Series2 are not displayed). We will assume that all series are used for bubble charts (which use the second Y-value for the radius of their bubbles).
Visual Basic Copy Code
Imports Dundas.Charting.WebControl<CRLF>...<CRLF><CRLF>' Apply filtering rule of ">2.5" to second Y value of data points in Series1<CRLF>Chart1.DataManipulator.Filter(CompareMethod.More, 2.5, "Series1
C# Copy Code
using Dundas.Charting.WebControl;<CRLF>  ...<CRLF><CRLF>// Apply filtering rule of "&gt;20.5" to first Y value of data points in Series1<CRLF>Chart1.DataManipulator.Filter(Microsoft.VisualBasic.CompareMethod.More, 20.5, "Series1

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 specified by the usingValue parameter of the first series' points, and by default if points match this filtering rule then all corresponding points from all series are deleted.

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 specified value from the FIRST specified series. If two series must be filtered independently call the Filter method twice using one series as a parameter.

If a specified output series has not been created and added to the SeriesCollection when this function call is made it will be created and added to the collection automatically, and have default Series properties (e.g. column chart type, etc.). In addition, the ChartArea property of the series is set to "Default", and if a chart area with the name "Default" exists in the ChartAreasCollection it will be used to draw the chart. If there is no chart area with this name the first ChartArea object in the collection will be used to display the series.

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

Copyright © 2001 - 2009 Dundas Data Visualization, Inc. and others.