Skip to main content

SeriesBase.DataFilters Property

OBSOLETE

This property is obsolete now. Use the FilterString or FilterCriteria property instead.

Gets a collection of data filter conditions which can be applied to the series’ data.

Namespace: DevExpress.XtraCharts

Assembly: DevExpress.XtraCharts.v24.1.dll

NuGet Package: DevExpress.Charts

Declaration

[Browsable(false)]
[Obsolete("This property is obsolete now. Use the FilterString or FilterCriteria property instead.")]
[XtraSerializableProperty(XtraSerializationVisibility.Collection, true)]
public DataFilterCollection DataFilters { get; }

Property Value

Type Description
DataFilterCollection

A DataFilterCollection object that represents the collection of filter conditions.

Remarks

If you use the DataFilters property (obsolete now), you can replace it with the FilterString or FilterCriteria property. If you had a DataFilter definition set in the design mode, it will be automatically converted to the SeriesBase.FilterString property when you upgrade your project to the latest version. If not, you should manually replace the DataFilters property with FilterString or FilterCriteria.

// To convert the following data filter definitions, ...
chartControl1.Series[0].DataFilters.Add(new DataFilter("Company", "System.String", DataFilterCondition.Equal, "DevAV North"));
chartControl1.Series[0].DataFilters.Add(new DataFilter("SaleDate", "System.DateTime", DataFilterCondition.Equal, new DateTime(2018, 12, 31)));
chartControl1.Series[0].DataFiltersConjunctionMode = ConjunctionTypes.And;

// use the FilterCriteria property:
chartControl1.Series[0].FilterCriteria = new BinaryOperator("Company", "DevAV North", BinaryOperatorType.Equal) &
                                         new BinaryOperator("SaleDate", new DateTime(2018, 12, 31), BinaryOperatorType.Equal);

// or the FilterString property:
chartControl1.Series[0].FilterString = "Company='DevAV North' And SaleDate=#2018-12-31#";
See Also