Skip to content

Subtotal.js Renderer Options

Nagarajan Chinnasamy edited this page Dec 4, 2017 · 7 revisions

arrowCollapsed

This option can be used to customize the default collapsed arrow ("\u25B6") displayed with subtotal row/column labels and pivot axis labels.

arrowExpanded

This option can be used to customize the default expanded arrow ("\u25B6") displayed with subtotal row/column labels and pivot axis labels.

collapseColsAt (Deprecated)

This option can be set to a numeric value as index of one of the elements of cols array. If this option is set, columns are collapsed at the given column attribute whenever the pivot table is (re)rendered. The default behavior is to render all columns expanded initially (ie., no collapse).

collapseRowsAt (Deprecated)

This option can be set to a numeric value as index of one of the elements of rows array. If this option is set, rows are collapsed at the given row attribute whenever the pivot table is (re)rendered. The default behavior is to render all rows expanded initially (ie., no collapse).

colSubtotalDisplay

Is a dictionary of options that can be used to control the way column-subtotals are displayed. It supports following options:

"collapseAt" - Collapse columns at the given level (numeric index of `cols` array)
"disableExpandCollapse" - Disables expand collapse operations. Defaults to false.
"disableFrom" - Disables displaying of subtotal from the given level (numeric index of `cols` array)
"disableAfter" - **Deprecated**. Disables displaying of subtotal after the given level (numeric index of `cols` array)
"disableSubtotal" - **Deprecated**. Disables displaying of subtotals.
"hideOnExpand" - Enables hiding of subtotals when expanded. Defaults to false.

rowSubtotalDisplay

Is a dictionary of options that can be used to control the way row-subtotals are displayed. It supports following options:

"collapseAt" - Collapse rows at the given level (numeric index of `rows` array)
"disableExpandCollapse" - Disables expand collapse operations. Defaults to false.
"disableFrom" - Disables displaying of subtotal from the given level (numeric index of `rows` array)
"disableAfter" - **Deprecated**. Disables displaying of subtotal after the given level (numeric index of `rows` array)
"disableSubtotal" - **Deprecated**. Disables displaying of subtotals.
"hideOnExpand" - Enables hiding of subtotals when expanded. Defaults to false.

table.eventHandlers

This option is set to a dictionary of events and their callback functions. On the occurrence of an event given in this option, the corresponding callback function is invoked by passing the table cell element, value of the element, filtering criteria to fetch matching records from data and SubtotalPivotData instance. See this example.