Home forums Chart Support Refresh Bar Chart in React JS Failed


Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
  • #26721

    I tried to import bar chart using react js.
    However the chart cannot refresh when the state changes.
    (To be exact, the values in the bars change but the length of the bars don’t)
    I tried to rerender/forceupdate but it seems useless.
    Can any one provide me the solution?
    Many Thanks.


    solutions found!

    Activate this code
    onRef={ref => this.chart = ref}

    And add this.chart.render() in the place you want to refresh the chart.



    Glad that you found the solution :) Please refer documentation page on React for more information.

    Shashi Ranjan
    Team CanvasJS

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

You must be logged in to reply to this topic.