Skip to main content

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

NameDescription
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

NameDescription
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

NameDescription
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

NameDescription
add-fieldFires when a new field is added to the rows, columns or values area
apply-filterFires when a filter is applied
delete-fieldFires when removing a field
move-fieldFires when reordering fields
open-filterFires when a filter is activated for a field
render-tableFires after the widget configuration has been processed and just before the table is rendered
show-config-panelFires when the visibility of the Configuration panel changes
update-configFires when modifying rows, columns, or aggregation functions via the Pivot UI
update-fieldFires when updating a field

Pivot properties

NameDescription
columnShapeOptional. Configures the look and behavior of the Pivot columns
configOptional. Defines the structure of the Pivot table and how data is aggregated
configPanelOptional. Controls the visibility of the Configuration panel in UI
dataOptional. An array of objects with data for the Pivot table
fieldsOptional. An array of objects with fields for the Pivot table
headerShapeOptional. Configures the look and behavior of headers in the Pivot table
limitsOptional. Defines the maximum limit for the number of rows and columns in the final dataset
localeOptional. An object of a custom locale of Pivot
methodsOptional. Defines custom mathematical methods for data aggregation
predicatesOptional. Provides custom pre-processing functions for the data dimensions (rows, columns)
readonlyOptional. Enables/disables the read-only mode
tableShapeOptional. Configures the look of the Pivot table