DataFilterCondition Enum
Lists the values that specify comparison operators used to filter data points within a series.
Namespace: DevExpress.XtraCharts
Assembly: DevExpress.XtraCharts.v24.1.dll
NuGet Package: DevExpress.Charts
Declaration
[ResourceFinder(typeof(XtraChartsResFinder), "PropertyNamesRes")]
[TypeConverter(typeof(EnumTypeConverter))]
public enum DataFilterCondition
Members
Name | Description |
---|---|
Equal
|
Specifies the “equal to” comparison operator. |
GreaterThan
|
Specifies the “greater than” comparison operator. |
GreaterThanOrEqual
|
Specifies the “greater than or equal to” comparison operator. |
LessThan
|
Specifies the “less than” comparison operator. |
LessThanOrEqual
|
Specifies the “less than or equal to” comparison operator. |
NotEqual
|
Specifies the “not equal to” comparison operator. |
Related API Members
The following properties accept/return DataFilterCondition values:
Library | Related API Members |
---|---|
Cross-Platform Class Library | DataFilter.Condition |
SeriesPointFilter.Condition | |
WinForms Controls | DataFilterModel.Condition |
SeriesPointFilterModel.Condition |
Remarks
The values listed by this enumeration are used to set the DataFilter.Condition property.
Example
The following example demonstrates how to create DataFilter objects, and apply their conditions to a series at runtime. For more information, refer to Filtering Data.
For this example to work correctly, a chart should contain at least one series, which is bound to the “Categories” data table in the Northwind Traders database (nwind.mdb file shipped with the XtraCharts demo). Please refer to the following tutorial to see how to bind a series to data: How to: Bind Individual Chart Series to Data (Runtime Sample).
The code below creates and applies the following filter to series data: “CategoryID = 1 or CategoryID = 4 or CategoryID = 7”
using DevExpress.XtraCharts;
// ...
// Create new data filters and specify conditions for them.
DataFilter dataFilter1 = new DataFilter("CategoryID", "System.Int32", DataFilterCondition.Equal, 1);
DataFilter dataFilter2 = new DataFilter("CategoryID", "System.Int32", DataFilterCondition.Equal, 4);
DataFilter dataFilter3 = new DataFilter("CategoryID", "System.Int32", DataFilterCondition.Equal, 7);
// Obtain the first series of the chart.
Series series1 = chartControl1.Series[0];
// Set the logical operator used to combine individual data filter conditions for this series.
series1.DataFiltersConjunctionMode = ConjunctionTypes.Or;
// Remove all other filters.
series1.DataFilters.Clear();
// Add new filters to apply to the series data.
series1.DataFilters.AddRange(new DataFilter[] {dataFilter1, dataFilter2, dataFilter3});