Log In
Home
Support
Demos
Documentation
Blogs
Training
Webinars
[Expand]Welcome to DevExpress .NET Documentation
[Expand]WinForms Controls
[Collapse]ASP.NET Controls and MVC Extensions
 [Expand]Prerequisites
 [Expand]What's Installed
 [Expand]Common Concepts
 [Collapse]ASP.NET WebForms Controls
   Getting Started
  [Expand]Reporting
  [Collapse]Chart Control
   [Expand]Product Information
   [Expand]Getting Started
   [Expand]Fundamentals
   [Collapse]Concepts
    [Collapse]Creating Charts
     [Expand]2D Chart Types
     [Expand]3D Chart Types
     [Collapse]Providing Data
       Manually Create a Series
       Manually Add Points to a Series
       Specify Series Data Members
       Automatic Series Creation
       Customize a Series
       Series Scale Types
       Pivot Charting (Integration with a Pivot Grid Control)
       Colorizer
     [Expand]Data Representation
     [Expand]Appearance Customization
     [Expand]Miscellaneous
    [Expand]Chart Elements
    [Expand]End-User Interaction
     Supported Browsers
     Adding a Web Chart
     Handling Client-side Scripts
     Medium Trust Support
     Web Farm and Web Gardens Support
   [Expand]Design-Time Features
   [Expand]Visual Elements
   [Expand]Examples
  [Expand]Grid View
  [Expand]Card View
  [Expand]Vertical Grid
  [Expand]Spreadsheet
  [Expand]Rich Text Editor
  [Expand]Image and Data Browsing
  [Expand]Docking and Popups
  [Expand]Site Navigation and Layout
  [Expand]File Management
  [Expand]Multi-Use Site Controls
  [Expand]Scheduler
  [Expand]HTML Editor
  [Expand]Pivot Grid
  [Expand]Tree List
  [Expand]Gauges
  [Expand]Data Editors
  [Expand]Spell Checker
  [Expand]Query Builder
 [Expand]ASP.NET MVC Extensions
 [Expand]Localization
 [Expand]Redistribution and Deployment
  Get More Help
 [Expand]API Reference
[Expand]ASP.NET Bootstrap Controls
[Expand]ASP.NET Core Bootstrap Controls
[Expand]WPF Controls
[Expand]Xamarin Controls
[Expand]Windows 10 App Controls
[Expand]Document Server
[Expand]Reporting
[Expand]Report Server
[Expand]Dashboard
[Expand]eXpressApp Framework
[Expand]CodeRush
[Expand]CodeRush Classic
[Expand]Cross-Platform Core Libraries
[Expand]Tools and Utilities
 End-User Documentation

Pivot Charting (Integration with a Pivot Grid Control)

This document describes the capability to automatically bridge (link) a chart with a Pivot Grid, lists the auto-defined options that are set after this link, and describes event handlers for manual customizations.

This document consists of the following sections.

Expanded Feature Overview

Both the WebChartControl and ASPxPivotGrid are well adapted to pair with each other in your application. While each control provides a specific set of related options, they also share some common properties between controls. This allows you to easily deploy the two as a bundle (or, a Pivot Chart), by simply specifying a Pivot Grid as a chart's data source.

A similar functionality is available for bridging the XRChart with the XRPivotGrid.

A Pivot Grid's data is auto-retrieved by a chart, after assigning an ASPxPivotGrid to the WebChartControl's ASPxDataWebControlBase.DataSourceID property.

You can vary the layout of the incoming data, using the options listed in the following section: The Data Source Options.

In addition, after specifying a Pivot Grid instance as a chart's data source, the following two properties automatically adjust this bridge: PivotGridDataSourceOptions.AutoBindingSettingsEnabled and PivotGridDataSourceOptions.AutoLayoutSettingsEnabled. To access the PivotGridDataSourceOptions object, use the WebChartControl.PivotGridDataSourceOptions property. If required, each of the settings that are affected by these automatic options can be tweaked in the corresponding event handler. This is detailed in the following section: The Automatic Settings.

Expanded The Data Source Options

A PivotGridDataSourceOptions object returned by the WebChartControl.PivotGridDataSourceOptions property contains settings that determine the common behavior for a bridged chart and Pivot Grid pair. This property is linked to the PivotGridControl.OptionsChartDataSource property of the associated Pivot Grid, and changing any of its options is synchronous for the associated control.

These settings are listed in the table below.

Function Member Description
Format of the incoming data PivotGridDataSourceOptions.RetrieveDataByColumns Specifies whether or not a Chart's series are created based on columns or rows of its associated Pivot Grid.
PivotGridDataSourceOptions.RetrieveEmptyCells Specifies whether or not empty cells should be passed to a Chart from its associated Pivot Grid.
Treatment of pivot totals PivotGridDataSourceOptions.RetrieveColumnCustomTotals Specifies whether or not column custom totals should be passed to a Chart from its associated Pivot Grid.
PivotGridDataSourceOptions.RetrieveColumnGrandTotals Specifies whether or not column grand totals should be passed to a Chart from its associated Pivot Grid.
PivotGridDataSourceOptions.RetrieveColumnTotals Specifies whether or not column totals should be passed to a Chart from its associated Pivot Grid.
PivotGridDataSourceOptions.RetrieveRowCustomTotals Specifies whether or not row custom totals should be passed to a Chart from its associated Pivot Grid.
PivotGridDataSourceOptions.RetrieveRowGrandTotals Specifies whether or not row grand totals should be passed to a Chart from its associated Pivot Grid.
PivotGridDataSourceOptions.RetrieveRowTotals Specifies whether or not row totals should be passed to a Chart from its associated Pivot Grid.
Limiting of the number of series and points PivotGridDataSourceOptions.MaxAllowedPointCountInSeries Limits the number of incoming points in a Chart's series that are auto-created, based on the associated Pivot Grid.
PivotGridDataSourceOptions.MaxAllowedSeriesCount Limits the number of a Chart's series that are auto-created, based on the associated Pivot Grid.
Additional option PivotGridDataSourceOptions.SinglePageOnly Specifies whether or not only the data from the Pivot Grid's current page is passed to the associated Chart.

Expanded The Automatic Settings

Automatic Binding Settings

The PivotGridDataSourceOptions.AutoBindingSettingsEnabled property automatically adjusts the following options.

To modify these settings, handle the WebChartControl.CustomizeAutoBindingSettings event, raised after applying them.


Automatic Layout Settings

The WebChartControl.AutoLayoutSettingsEnabled property automatically adjusts the chart's layout differently for two main diagram types.

For series labels of both diagram types, the SeriesLabelBase.ResolveOverlappingMode is set to Default (if possible), or to HideOverlapped (when the labels count is too large for the current diagram size).

Note that before updating this property, the WebChartControl.CustomizeResolveOverlappingMode event is raised.

Finally, the Legend.MaxHorizontalPercentage and the Legend.MaxVerticalPercentage properties of the chart's legend are automatically set to best fit.

Note

Before updating the above properties, the WebChartControl.CustomizeLegend event is raised.

Expanded See Also

Is this topic helpful?​​​​​​​