isImage();
The isImage method determines whether the express report chart is an image.
The method returns True if the express report chart is an image, or False if otherwise.
Boxplot, petal chart, and other pie charts (except the standard one) are shown in the express report as an image. Only petal chart can be set up from the interface.
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. Check if the current chart is an image:
// Get express report chart view var chartView = expressBox.getDataView().getChartView(); if (chartView != null) { // Determine whether chart is an image var isImage = chartView.isImage(); // Determine chart type var chartType = chartView.getChartType().Type; if (isImage) { console.log("Chart of the «" + chartType + "» type is an image."); } else { console.log("Chart of the «" + chartType + "» tyoe is not an image."); } }
After executing the example the browser consolw displays the following message:
The column chart is not an image.
See also: