Log In
Home
Support
Demos
Documentation
Blogs
Training
Webinars
[Expand]General Information
[Collapse]WinForms Controls
  Prerequisites
 [Expand]What's Installed
 [Expand]Build an Application
 [Collapse]Controls and Libraries
  [Expand]Forms and User Controls
  [Expand]Messages, Notifications and Dialogs
  [Expand]Editors and Simple Controls
  [Expand]Ribbon, Bars and Menu
  [Expand]Application UI Manager
  [Expand]Docking Library
  [Expand]Data Grid
  [Expand]Vertical Grid
  [Expand]Pivot Grid
  [Expand]Tree List
  [Collapse]Chart Control
   [Expand]Getting Started
   [Expand]Fundamentals
   [Collapse]Providing Data
    [Collapse]Providing Data
      Manually Create a Series
      Manually Add Points to a Series
      Specify Series Data Members
      Automatic Series Creation
      Series Customization
      Series Scale Types
      Pivot Charting (Integration with a Pivot Grid Control)
      Data Aggregation
      Colorizer
    [Expand]Data Representation
   [Expand]Appearance Customization
   [Expand]End-User Features
   [Expand]Design-Time Features
   [Expand]Visual Elements
   [Expand]Examples
   [Expand]Additional Resources
  [Expand]Diagrams
  [Expand]Gauges
  [Expand]Map Control
  [Expand]Scheduler
  [Expand]Spreadsheet
  [Expand]Rich Text Editor
  [Expand]Spell Checker
  [Expand]Form Layout Managers
  [Expand]Navigation Controls
  [Expand]Printing-Exporting
  [Expand]PDF Viewer
   Reporting
  [Expand]Snap
  [Expand]TreeMap Control
 [Expand]Common Features
  Get More Help
 [Expand]API Reference
[Expand]ASP.NET Controls and MVC Extensions
[Expand]ASP.NET 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]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 WinForms Chart Control and PivotGridControl 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.

To learn how to bind a Chart control with a Pivot Grid, see the Integration with the Chart Control topic.

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 a PivotGridControl instance to the ChartControl.DataSource 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 ChartControl.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 ChartControl.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 options PivotGridDataSourceOptions.SelectionOnly Specifies whether or not only the currently selected cells of a Pivot Grid are reflected in its associated Chart.
PivotGridDataSourceOptions.UpdateDelay Specifies the delay (in milliseconds) that occurs before passing the changes made in a Pivot Grid to its associated Chart.

Expanded The Automatic Settings

Automatic Binding Settings

The PivotGridDataSourceOptions.AutoBindingSettingsEnabled property automatically adjusts the following options.

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


Automatic Layout Settings

The ChartControl.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

Before updating this property, the ChartControl.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 ChartControl.CustomizeLegend event is raised.

Expanded See Also

How would you rate this topic?​​​​​​​