Skip to main content

Integration with the DXCharts Suite

  • 5 minutes to read

The DXPivotGrid Suite presents multidimensional data in a cross-tabular form, allowing end-users to perform various data shaping operations. They can customize the report to reshape data and get a layout that suits best for their specific data analysis tasks.

DXPivotGrid allows end-users to go further and visualize data displayed in the Pivot Grid using the DXCharts Suite.

pivotgrid_ChartsIntegration

This topic contains the following sections.

#Binding Concepts

There are two ways of providing data to ChartControl: manual and automatic series creation. Using a PivotGridControl as a data source implies that series are created automatically.

In the automatic series mode, ChartControl requires three data members to be provided:

  • a series data member - a data source field whose unique values should represent chart series;
  • an argument data member - a data source field whose values should represent series point arguments;
  • a value data member - a data source field whose values should represent series point values.

To supply a ChartControl with data, PivotGridControl provides a specific chart data source with data members defined as follows:

  • series data member values are generated based on pivot grid columns;
  • argument data member values are generated based on pivot grid rows;
  • value data member contains summary values.

Series and argument data members are created based on column/row headers (e.g. '1994', 'Produce Total', 'Grand Total'). If a column/row is identified by multiple fields, the corresponding data member value is constructed from the respective field values connected by the '|' sign (e.g. '1995 | January', 'Beverages | Chai').

Use the PivotGridControl.ChartProvideDataByColumns property to toggle the default behavior in order to create a series data member based on rows and an argument data member based on columns.

#Implementation

To set a PivotGridControl as ChartControl's data source, do the following steps.

#Data Types Specifics

If a Pivot Grid contains multiple data fields with different data types (PivotGridField.DataType), cell values are converted to Decimal (if possible). Use the PivotGridControl.ChartProvideCellValuesAsType property to override this behavior by explicitly specifying a data type to which cell values should be converted.

ChartControl supports only Numeric and DateTime series point values (see Series Scale Types to learn more). To convert cell values into an appropriate type in a custom manner, handle the PivotGridControl.CustomChartDataSourceData event.

#Chart Options

PivotGridControl provides multiple options, enabling you to specify how its data is interpreted by ChartControl.

Property Description
PivotGridControl.ChartProvideDataByColumns Gets or sets whether series in a chart control are created based on PivotGrid columns or rows. This is a dependency property.
PivotGridControl.ChartSelectionOnly Gets or sets whether a chart control should visualize data from the selected cells only.
PivotGridControl.ChartProvideColumnCustomTotals Gets or sets whether column custom totals should be passed to a chart control. This is a dependency property.
PivotGridControl.ChartProvideColumnGrandTotals Gets or sets whether column grand totals are passed to a chart control. This is a dependency property.
PivotGridControl.ChartProvideRowCustomTotals Gets or sets whether row custom totals should be displayed in a chart control. This is a dependency property.
PivotGridControl.ChartProvideRowGrandTotals Gets or sets whether row grand totals are passed to a chart control. This is a dependency property.
PivotGridControl.ChartProvideRowTotals Gets or sets whether row totals are passed to a chart control. This is a dependency property.
PivotGridControl.ChartProvideEmptyCells Gets or sets whether empty cells should be processed by the Chart control. This is a dependency property.
PivotGridControl.ChartFieldValuesProvideMode Gets or sets how field values are passed to the chart control. This is a dependency property.
PivotGridControl.ChartProvideCellValuesAsType Gets or sets the type to which cell values are converted before they are exported to the Chart Control. This is a dependency property.
PivotGridControl.ChartProvideColumnFieldValuesAsType Gets or sets the type to which the column field values are converted before they are exported to the chart control. This is a dependency property.
PivotGridControl.ChartProvideRowFieldValuesAsType Gets or sets the type to which the row field values are converted before they are exported to the chart control. This is a dependency property.
PivotGridControl.ChartUpdateDelay Gets or sets the delay between changing the cell focus or selection, and updating the bound Chart control. This is a dependency property.
PivotGridControl.ChartMaxPointCountInSeries Gets or sets the maximum allowed number of points in a series. This is a dependency property.
PivotGridControl.ChartMaxSeriesCount Gets or sets the maximum allowed number of series in the chart data source. This is a dependency property.

#Example