Autogenerated Series

Sales amount, $
2017
2018
Last year

The Chart allows you to 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 specifies series names.
  • SummaryMethod — A method that calculates summaries for points with the same argument value. You can use any function with the Func<IEnumerable, TValue> signature as a value of this setting. A static Enumerable.Sum method is used in this demo.
  • ArgumentField — A data field that specifies series arguments.
  • ValueField — Specifies a data field that specifies 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.