We have updated Flexmonster Software License Agreement, effective as of September 30, 2024. Learn more about what’s changed.
All documentation
  • API Reference for older versions
  • 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:

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

    Live example

    2) Setting options for all reports:

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

    Live example

    3) Setting localization for all reports:

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

    Live example

    See also

    Configuring global options
    ReportObject