Chart: Object
The Chart property sets and gets metadata of express report chart.
Use the setChart method to set the property value, and the getChart method to get the property value. Property value cannot be set from JSON.
To call the setChart method, specify the following parameters: report - sheet of the express report document, metadata - JSON object that contains data on the chart, chart - chart , asImage - indicates if the chart is shown as an image, callback - callback function.
For the getChart method specify the following parameters: analyzer - sheet of express report document, asImage - indicates if the chart is shown as an image, callback - callback function.
Executing the example requires that the HTML page contains the ExpressBox component named expressBox (see Example of Creating the ExpressBox Component) and have a loaded chart in working area of the express report. Get information about this chart:
// Get service for working with express report var eaxMdService = expressBox.getService(); // Get the express report document var eaxAnalyzer = expressBox.getSource(); var metadata = eaxMdService.getChart(eaxAnalyzer); if (metadata) { console.log("Object that contains info on the express report chart:"); console.log(metadata); } else { console.log("No information is available on the express report chart."); }
After executing the example the browser console displays an object that contains chart metadata, or a message informing that no information on the chart is available.
See also: