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

GlobalObject

The GlobalObject is used to set configurations that will be applied to all reports. These configurations can be overwritten for specific reports. Learn more about the GlobalObject in this guide: Configuring global options.

Properties

global: {
  dataSource: DataSourceObject,
  options: OptionsObject,
  localization: string | object
}
Property/TypeDescription
dataSource
DataSourceObject
optional Contains information about the data source.
options
OptionsObject
optional Allows configuring the component’s UI and specifying functionality available to users.
localization
String | Object
optional Allows localizing the component.
The localization property can be either inline JSON or the URL to a localization JSON file.
Learn more about setting localization in this tutorial: Localizing the component.

Examples

1) Specifying a common data source for all reports:

const pivot = new Flexmonster({
container: "pivotContainer",
global: {
dataSource: {
filename: "data/data.csv"
}
}

});

Live example

2) Setting options for all reports:

const pivot = new Flexmonster({
container: "pivotContainer",
global: {
options: {
readOnly: true
}

}
});

Live example

3) Setting localization for all reports:

const pivot = new Flexmonster({
container: "pivotContainer",
global: {
localization: "loc/es.json"
}

});

Live example

See also

Configuring global options
ReportObject