Need a special offer?Find out if your project fits.
+
All documentation
API reference
  • API Reference for older versions
  • 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.

    Properties

    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.

    Examples

    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"
        }
      }
    });

    Check out a live sample on JSFiddle.

    2) Setting options for all reports:

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

    See an example on JSFiddle.

    3) Setting localization for all reports:

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

    See the full code on JSFiddle.

    See also

    Configuring global options
    ReportObject