How to get Zingchart updated

We use the socket library to download data from our service. I do the following: send this data to zingchart (after massaging the data):

myChart.series[0].values.push([xVal, yVal]); // index 0 is hard coded for demo

However, charts are not updated. We would like them to feel in real time.

+4
source share
1 answer

ZingChart does not have a two-way data binding, so modifications to the data object after rendering are not affected.

However, ZingChart does have an API with a lot of killers. If you are trying to add values ​​to a series, try the appendseriesvalues method . It should look something like this ...

zingchart.exec("your_chart_id", "appendseriesvalues", {
    values: [xVal,yVal]
});

, setInterval .

ZingChart. , .

+6

All Articles