Skip to main content
All docs
V24.1

SeriesTemplateSummaryAdapter.QualitativeSummaryOptions Property

Returns options that configure how the series calculates summary values of a data source with qualitative arguments.

Namespace: DevExpress.XtraCharts

Assembly: DevExpress.XtraCharts.v24.1.dll

NuGet Package: DevExpress.Charts

Declaration

[PersistenceMode(PersistenceMode.InnerProperty)]
[XtraChartsLocalizableCategory(XtraChartsCategory.Data)]
[XtraSerializableProperty(XtraSerializationVisibility.Content)]
public QualitativeSummaryOptions QualitativeSummaryOptions { get; }

Property Value

Type Description
QualitativeSummaryOptions

Stores summarization settings for a chart with qualitative arguments.

Remarks

The QualitativeSummaryOptions include the SummaryFunction property. This property defines a function used to summarize series values.

Example

The following example shows how to create multiple series based on a template and aggregate their points with equal arguments:

using DevExpress.XtraCharts;
using System;
using System.Collections.Generic;
using System.Windows.Forms;

namespace SummaryChart {
    public partial class Form1 : Form {
        ChartControl chart;

        private void OnLoad(object sender, EventArgs e) {

            // Specify the chart data source.
            chart.DataSource = DataPoint.GetDataPoints();

            //Create a summary data adapter.
            SeriesTemplateSummaryAdapter dataAdapter = new SeriesTemplateSummaryAdapter();

            // Create a data member that defines arguments.
            dataAdapter.DataMembers.Add(new DataMember {
                DataMemberType = ChartDataMemberType.Argument,
                ColumnName = "Category",
                ScaleType = ScaleType.Qualitative
            });
            // Create a data member that defines values.
            dataAdapter.DataMembers.Add(new DataMember {
                DataMemberType = ChartDataMemberType.Value,
                ColumnName = "Value",
                ScaleType = ScaleType.Numerical
            });
            // Create a data member that identifies data series.
            dataAdapter.DataMembers.Add(new DataMember {
                DataMemberType = ChartDataMemberType.Series,
                ColumnName = "Region",
                ScaleType = ScaleType.Qualitative
            });

            // Specify a summary function.
            dataAdapter.QualitativeSummaryOptions.SummaryFunction = "SUM([Value])";

            // Assign the data adapter to the chart.
            chart.SeriesTemplate.DataAdapter = dataAdapter;
        }

        public class DataPoint {
            public string Category { get; set; }
            public string Region { get; set; }
            public double Value { get; set; }
            public static List<DataPoint> GetDataPoints() {
                return new List<DataPoint> {
                    new DataPoint { Category = "Video players", Region = "Asia",          Value = 853D},
                    new DataPoint { Category = "Video players", Region = "Europe",        Value = 655D},
                    new DataPoint { Category = "Video players", Region = "Europe",        Value = 204D},
                    new DataPoint { Category = "Video players", Region = "Europe",        Value = 365D},
                    new DataPoint { Category = "Video players", Region = "North America", Value = 1325D},
                    new DataPoint { Category = "Automation",    Region = "Asia",          Value = 172D},
                    new DataPoint { Category = "Automation",    Region = "Asia",          Value = 243D},
                    new DataPoint { Category = "Automation",    Region = "Asia",          Value = 396D},
                    new DataPoint { Category = "Automation",    Region = "Europe",        Value = 981D},
                    new DataPoint { Category = "Automation",    Region = "North America", Value = 963D},
                    new DataPoint { Category = "Monitors",      Region = "Asia",          Value = 1011D},
                    new DataPoint { Category = "Monitors",      Region = "Europe",        Value = 721D},
                    new DataPoint { Category = "Monitors",      Region = "Europe",        Value = 132D},
                    new DataPoint { Category = "Monitors",      Region = "North America", Value = 565D},
                    new DataPoint { Category = "Monitors",      Region = "North America", Value = 423D}
                };
            }
        }
    }
}
See Also