All documentation
  • API Reference for older versions
  • load

    load(url: String, requestHeaders: Object)

    [starting from version: 1.4]

    Loads the report file from the specified URL.

    Parameters

    Parameter/TypeDescription
    url
    String
    The URL to your report. The report can be stored in a file or returned by a server-side script.
    requestHeaders
    Object
    optional Allows you to add custom request headers when loading a report from a server. This object consists of "key": "value" pairs, where "key" is a header’s name and "value" is its value.

    Examples

    1) Load local report:

    pivot.load("data/reports/report2.json");

    2) Load remote report:

    pivot.load("https://yourserver.com/script_which_returns_report_json.php");

    Open the example on JSFiddle.

    3) Load a report from a resource that requires specific request headers (e.g., authorization headers):

    pivot.load("https://yourserverwithauth.com/report_json.php", 
    {
    AuthToken: "XXXX"
    }
    );

    See also

    open
    save
    getReport
    setReport
    shareReport
    Save and restore the report