This section describes the configuration options of the PivotGridDataSource object.

To create a PivotGridDataSource instance that uses custom data access logic, pass the CustomStore configuration object to the PivotGridDataSource constructor as shown below.
var myPivotGridDataSource = new{
    load: function(loadOptions) {
        // data loading logic
    byKey: function(key) {
        // data access by key logic


An array of pivot grid fields.

Type: Array
Default Value: undefined

If the store type you use is not XmlaStore, you need to describe data from the data source for PivotGrid by assigning a list of fields to this option. Each pivot grid field must be associated with the field in the store using the dataField option.

Fields can be instantly placed into the pivot grid by assigning a value to the area option. If this option is undefined, the field will be displayed in the Field Chooser only.

If this array is not specified and the retrieveFields option is set to true, the fields will be generated automatically and placed to the Field Chooser.


Specifies data filtering conditions. Cannot be used for the XmlaStore store type.

For information on filter expressions, refer to the Filtering section of the Data Layer article.


A handler for the changed event.

Type: function

Assign a function to perform a custom action after data is successfully loaded or reloaded.


A handler for the fieldsPrepared event.

Type: function
Function parameters:
fields: Array

An array of fields.

Assign a function to perform a custom action when all fields are loaded from the Store and prepared to be displayed in the PivotGrid.


A handler for the loadError event.

Type: function
Function parameters:
error: Object

An object defining the occurred error.

Assign a function to perform a custom action when data loading fails.


A handler for the loadingChanged event.

Type: function
Function parameters:
isLoading: Boolean

Indicates if data is being loaded.

Assign a function to perform a custom action when the data loading status is changed.


Indicates whether or not the automatic field generation from data in the Store is enabled.

Type: Boolean
Default Value: true

With this option enabled, the automatically generated fields will be available in the Field Chooser.

If you disable this option, the PivotGrid will contain only those fields that are configured in the fields array.


Specifies the underlying Store instance used to access data.

You can assign any Store instance, an XmlaStore instance or an array to this option. If you assign an array, the ArrayStore will automatically be created within the PivotGridDataSource internally.