☝️Small business or a startup? See if you qualify for our special offer.
+
All documentation

setOptions

setOptions(options: OptionsObject)

[starting from version: 1.6]

Sets the component's options.

Use the refresh() API call after to redraw the component and see changes.

Parameters

Parameter/TypeDescription
options
OptionsObject
Contains the list of component's options and their new values.
Note that changes to the following options take effect only after reloading the report (e.g., using setReport()):

Examples

1) How to turn off totals:

let options = pivot.getOptions();
options.grid.showTotals = "off";
pivot.setOptions(options);
pivot.refresh();

Try on JSFiddle.

2) How to set a chart title:

pivot.setOptions({
chart: {
title: "Chart One"
}
});
pivot.refresh();

See also

OptionsObject
getOptions
refresh
Options tutorial