PivotGridOptionsChartDataSourceBase.DataProvideMode Property

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

Namespace: DevExpress.XtraPivotGrid.Data

Assembly: DevExpress.PivotGrid.v20.1.Core.dll

Declaration

[DefaultValue(PivotChartDataProvideMode.ProvideLastLevelData)]
public virtual PivotChartDataProvideMode DataProvideMode { get; set; }
<DefaultValue(PivotChartDataProvideMode.ProvideLastLevelData)>
Public Overridable Property DataProvideMode As PivotChartDataProvideMode

Property Value

Type Default Description
PivotChartDataProvideMode

ProvideLastLevelData

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

Property Paths

You can access this nested property as listed below:

Library Object Type Path to DataProvideMode
WinForms Controls PivotGridControl
.OptionsChartDataSource.DataProvideMode
ASP.NET Controls and MVC Extensions ASPxPivotGrid
.OptionsChartDataSource.DataProvideMode
MVCxPivotGrid
.OptionsChartDataSource.DataProvideMode
PivotGridSettings
.OptionsChartDataSource.DataProvideMode
Reporting XRPivotGrid
.OptionsChartDataSource.DataProvideMode

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 DataProvideMode 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 PivotGridOptionsChartDataSourceBase.FieldValuesProvideMode property to PivotChartFieldValuesProvideMode.DisplayText.

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

See Also