Home › forums › Using CanvasJS › redraw chart
Tagged: redrawing dynamic charts
This topic contains 4 replies, has 3 voices, and was last updated by Sunil Urs 4 years, 11 months ago.
i need the function in canvasjs to redraw a dynamic chart with multiple data-series.
In order to redraw a chart you just need to change the data and call render() method again.
I cant make it work with the doughnut chart at all.
Take a look at my tests:
It only changes the colors of the graphics, not the values.
What I am doing is setting:
chartTwitter.options.data.dataPoints = [my new dataPoints]
If I do like in the example:
Creating Dynamic Charts
Just updating the dataPoints variable array, nothing happens.
Besides that, I couldnt manage to creat charts runtime, instead of using “onLoad”.
It looks like that the way it search for the canvas context get messes up if you dont use onload.
Do you have any workable example that dont use “onload” event to create the chart?
Oops, forget about the redraw part.
Just got it to work.
But can I animate the redrawing process, as if it was being created for the first time?
As of now animation is supported only for Pie Charts – during first render. For other charts it isn’t available yet.
You must be logged in to reply to this topic.