Chartjs-React-chartjs state update error

4๐Ÿ‘

โœ…

If data passed into the component changes, points will animate between values using chart.jsโ€™ .update(). If you want the chart destroyed and redrawn on every change, pass in redraw as a prop. For example <LineChart data={this.state.chartData} redraw />

Adding redraw solves the problem.

Leave a comment