Chart Integration

Grand Total
Amount Count Amount Count Amount Count Amount Total Count Total
43620 26 45200 28 22020 11 110840 65
117220 27 120495 29 74820 14 312535 70
101475 31 76130 27 42270 13 219875 71
160075 40 174025 42 69655 16 403755 98
229645 79 204205 67 72925 27 506775 173
97845 38 100480 42 50315 17 248640 97
Grand Total 749880 241 720535 235 332005 98 1802420 574

This demo illustrates linked Chart and Pivot Grid components. The chart is automatically updated when a user expands or collapses rows/columns in the Pivot Grid, and the Chart shows data from the Pivot Grid's lowest expanded level.

To link these components, do the following:

  1. Create a custom method that asynchronously returns an IEnumerable collection (Sales.Load() in this demo).
  2. Create a data provider object (PivotGridDataProvider in this demo).
  3. Bind the Pivot Grid to the data provider object's PivotGridDataSource property.
  4. Bind Charts to the data provider object's ChartDataSource property.
  5. Assign corresponding fields to NameField, ArgumentField, and ValueField properties.
  6. Additionally, you can assign a data field name to the PaneField property. This enables the Chart to group data by the corresponding field's values and create a separate Pane for each group.