Get Free Trial
API reference
Table of contents

GlobalObject

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

The GlobalObject has the following properties:

  • dataSource optionalDataSourceObject. Contains information about the data source.
  • options optionalOptionsObject. Allows configuring the component’s UI and specifying functionality available to users.
  • localization optional – String | Object. 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:

let pivot = new Flexmonster({
	container: "pivot-container",
	global: {
		dataSource: {
			filename: "data/data.csv"
		}
	}
});

Check out a live sample on JSFiddle.

2) Setting options for all reports:

let pivot = new Flexmonster({
	container: "pivot-container",
	global: {
		options: {
			readOnly: true
		}
	}
});

See an example on JSFiddle.

3) Setting localization for all reports:

let pivot = new Flexmonster({
	container: "pivot-container",
	global: {
		localization: "loc/es.json"
	}
});

See the full code on JSFiddle.

See also

Configuring global options
ReportObject