Hi webix-team,
in my snippet https://snippet.webix.com/67cuuqfd I want load new data to my chart. In a earlier version of highcharts I did it with $$(“chart”).parse but this don’t work. Thanks for advice.
Best regards, Rainer
Hello @RainerRoss ,
You can get the chart object withgetChart(true)
, the method returns a promise, which allows you use its properties and work with highcharts API:
const newdata = [1,2,3]
$$("mychart").getChart(true).then(function(chart){
chart.series[0].setData(newdata);
chart.redraw();
});
Please take a look at the snippet:
https://snippet.webix.com/7c772kv0
Hello @annazankevich,
thank you it works very fine. Here is the snippet to load new series data https://snippet.webix.com/mwmozu18 is the code correct?
@RainerRoss ,
Yeah, it’s correct.
Hello @annazankevich,
now loading a new series works with Highcharts 7.0.3 like this https://snippet.webix.com/rt67nup4
but when I define the new Highcharts Version 8.0.4 in Line 35 https://snippet.webix.com/o3qhqkef
and click several times the “Load new Data” Button the Legend and the Color are updated but not the Data. Thanks for advice, Rainer
Hello @RainerRoss,
Please try to use the copy method: series:webix.copy(chartdata[0])
Here is the snippet:
https://snippet.webix.com/u6gtzkti
Hello @annazankevich,
thanks, it works fine
have a nice day