Home forums Using CanvasJS redraw chart

This topic contains 4 replies, has 3 voices, and was last updated by  Sunil Urs 3 years, 2 months ago.

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #4859

    umustaphax
    Participant

    hi,
    i need the function in canvasjs to redraw a dynamic chart with multiple data-series.
    thank you.

    #4860

    Sunil Urs
    Keymaster

    In order to redraw a chart you just need to change the data and call render() method again.

    #5230

    pablocabana
    Participant

    I cant make it work with the doughnut chart at all.
    Take a look at my tests:
    https://cabanapps.com.br/valores-vale/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
    chartTwitter.render();

    If I do like in the example:
    http://canvasjs.com/docs/charts/how-to/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?

    #5231

    pablocabana
    Participant

    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?

    #5232

    Sunil Urs
    Keymaster

    As of now animation is supported only for Pie Charts – during first render. For other charts it isn’t available yet.

Viewing 5 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic.