Charts - Dynamic SeriesUpd
The Chart allows you select data that matches the specified criterion from a data source and display chart series based on this data.
To do this, use the following settings available through the DxChartCommonSeries object:
- NameField – A data field that provides series names.
- AggregationMethod – A data aggregation method. You can use any function with the Func<IEnumerable<TValue>, TValue> signature as a value of this setting. A static Enumerable.Sum method is used in this demo.
- ArgumentField – A data field that provides series arguments.
- ValueField – Specifies a data field that provides series values.
You can also use the SeriesTemplate property to specify different templates for specific series types: DxChartBarSeries, DxChartLineSeries, and other type-specific series objects. Note that the SeriesTemplate property is used as many times as the number of data groups that match the specified criterion.
The following chart displays two series with multiple points. The point labels can overlap each other. The LabelOverlap property is set to ChartLabelOverlap.Hide to hide overlapping labels. You can also set this property to ChartLabelOverlap.Stack to arrange labels in a stack formation.