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.
global: { dataSource: DataSourceObject, options: OptionsObject, localization: string | object }
Property/Type | Description |
---|---|
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. |
1) Specifying a common data source for all reports:
let pivot = new Flexmonster({ container: "pivot-container", componentFolder: "node_modules/flexmonster/", global: { dataSource: { filename: "data/data.csv" } } });
2) Setting options for all reports:
let pivot = new Flexmonster({ container: "pivot-container", componentFolder: "node_modules/flexmonster/", global: { options: { readOnly: true } } });
3) Setting localization for all reports:
let pivot = new Flexmonster({ container: "pivot-container", componentFolder: "node_modules/flexmonster/", global: { localization: "loc/es.json" } });