Options: Object
The Options property determines chart settings.
To execute this example, the HTML page must contain the ReportBox component named reportBox (see Example of the ReportBox Component Layout). A chart must be available on regular report sheet. Change the chart background color:
var prxChart = reportBox.getDataView().getGridView().getTabSheet().getModel().getObjects()[0].getITabObject(); //get regular report chart opts = prxChart.getInstance().options; //get current settings of the chart opts.chart.backgroundColor = "#FFFACD"; //set new color for the chart background prxChart.setOptions(opts); //set modified chart settings to the Options field prxChart.refreshJSON(prxChart.getOptions()); //refresh chart settings prxChart.OptionsChanged.add(function (sender, args) { console.log(args) }); //add handler for the chart settings change event prxChart.setInstance(prxChart.getOptions()); //change chart settings
After executing the example the chart background color is changed and the OptionsChanged event is fired: the browser console shows JSON object that contains chart settings.
See also: