API overview
Pivot constructor
new pivot.Pivot("#root", {
// configuration parameters
});
Parameters:
- an HTML container (the ID of the HTML container)
- an object of the configuration parameters (check here)
Pivot methods
| Name | Description |
|---|---|
| getTable() | Gets access to the underlying Table widget instance in the Pivot table |
| setConfig() | Updates the current configuration of the Pivot widget |
| setLocale() | Applies a new locale to Pivot |
| showConfigPanel() | Shows or hides the Configuration panel |
Pivot internal API
Event Bus methods
| Name | Description |
|---|---|
| api.detach() | Allows removing/detaching action handlers |
| api.exec() | Allows triggering the inner events |
| api.intercept() | Allows intercepting and preventing the inner events |
| api.on() | Allows attaching a handler to the inner events |
| api.setNext() | Allows adding some action into the Event Bus order |
State methods
| Name | Description |
|---|---|
| api.getReactiveState() | Gets an object with the reactive properties of Pivot |
| api.getState() | Gets an object with the StateStore properties of Pivot |
| api.getStores() | Gets an object with the DataStore properties of Pivot |
Pivot events
| Name | Description |
|---|---|
| add-field | Fires when a new field is added to the rows, columns or values area |
| apply-filter | Fires when a filter is applied |
| delete-field | Fires when removing a field |
| move-field | Fires when reordering fields |
| open-filter | Fires when a filter is activated for a field |
| render-table | Fires after the widget configuration has been processed and just before the table is rendered |
| show-config-panel | Fires when the visibility of the Configuration panel changes |
| update-config | Fires when modifying rows, columns, or aggregation functions via the Pivot UI |
| update-field | Fires when updating a field |
Pivot properties
| Name | Description |
|---|---|
| columnShape | Optional. Configures the look and behavior of the Pivot columns |
| config | Optional. Defines the structure of the Pivot table and how data is aggregated |
| configPanel | Optional. Controls the visibility of the Configuration panel in UI |
| data | Optional. An array of objects with data for the Pivot table |
| fields | Optional. An array of objects with fields for the Pivot table |
| headerShape | Optional. Configures the look and behavior of headers in the Pivot table |
| limits | Optional. Defines the maximum limit for the number of rows and columns in the final dataset |
| locale | Optional. An object of a custom locale of Pivot |
| methods | Optional. Defines custom mathematical methods for data aggregation |
| predicates | Optional. Provides custom pre-processing functions for the data dimensions (rows, columns) |
| readonly | Optional. Enables/disables the read-only mode |
| tableShape | Optional. Configures the look of the Pivot table |