Home forums Using CanvasJS redraw chart Reply To: redraw chart



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[0].dataPoints = [my new dataPoints]
and calling

If I do like in the example:

Creating Dynamic Charts

Just updating the dataPoints variable array, nothing happens.

Any help?

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?