Get Free Trial
API reference
Table of contents

load

load(url: String, requestHeaders: Object)

[starting from version: 1.4]

Loads the report file from the specified URL.

Parameters

  • url – String. The URL to the report file.
  • requestHeaders optional – Object. 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:

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

2) Load remote report:

flexmonster.load("http://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):

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

See also

open
save
getReport
setReport
shareReport
Save and restore the report