Skip to main content

PivotGridControl.ChartDataProvideMode Property

Gets or sets what data the pivot grid should pass to a bound chart control. This is a dependency property.

Namespace: DevExpress.Xpf.PivotGrid

Assembly: DevExpress.Xpf.PivotGrid.v24.1.dll

NuGet Package: DevExpress.Wpf.PivotGrid

Declaration

public PivotChartDataProvideMode ChartDataProvideMode { get; set; }

Property Value

Type Description
PivotChartDataProvideMode

A PivotChartDataProvideMode enumeration member that specifies what data the pivot grid should pass to a bound chart control.

Available values:

Name Description
ProvideLastLevelData

PivotGrid passes only values from the lowest aggregation level.

UseCustomSettings

PivotGrid determines which values to provide based on the PivotGridControl.ChartProvide…Totals property values.

Remarks

When displaying pivot grid data in a chart, you rarely need to compare cell values to Totals or Grand Totals as these values differ significantly. At the same time, when selecting large cell blocks, Total values inevitably appear within the selection.

Use the ChartDataProvideMode property to solve this. When this property is set to PivotChartDataProvideMode.ProvideLastLevelData, the pivot grid automatically defines which values should be passed to ChartControl. It analyzes the current selection, finds the lowest-level data and excludes all higher-level Totals.

The following animation shows how selection changes are reflected within a bound Chart control.

DataProvideMode

Note that this feature works only if field values are passed to the chart as text. By default, numeric or date-time values are not cast to text and passed to the chart “as is”. To force the pivot grid to cast them to strings, set the PivotGridControl.ChartFieldValuesProvideMode property to PivotChartFieldValuesProvideMode.DisplayText.

With specific selections, PivotGridControl is unable to define which values have the lowest level. To specify the pivot grid behavior in such cases, use the PivotGridControl.ChartDataProvidePriority property. To learn more, see PivotGridControl.ChartDataProvidePriority.

See Also