Skip to main content
A newer version of this page is available. .

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.v18.2.Core.dll

Declaration

[DefaultValue(PivotChartDataProvideMode.ProvideLastLevelData)]
[XtraSerializableProperty]
public virtual PivotChartDataProvideMode DataProvideMode { get; set; }

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.

Available values:

Name Description
ProvideLastLevelData

PivotGrid passes only values from the lowest aggregation level.

UseCustomSettings

PivotGrid determines which values to provide based on the PivotGridOptionsChartDataSourceBase.Provide…Totals property values.

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