I have a highcharts displayed on screen with a "edit" button to edit the chart. On "edit" I open the highcharts editor.
I want to push the data from highcharts displayed on the screen to the highcharts editor popup - how can I do this?
Code: Select all
loadeditor()
{
this.modal = this.highEditor.highed.ModalEditor(false, {
allowDone: true
},
function (html) {
//This is called when the chart editing is done
self.updateChart(html);
}
);
this.modal.editor.chart.on('New', this.setDefaultData(this.modal.editor))
this.modal.show();
}
setDefaultData(editor) {
let highWindow = eval('window');
let json3 = highWindow.deChart.options;
editor.chart.options.chart = json3;
}
Code: Select all
editor.chart.data.csv(csvData)