chartjs / chartjs-plugin-deferred

Chart.js plugin to defer initial chart updates
https://chartjs-plugin-deferred.netlify.app/
MIT License
110 stars 21 forks source link

Ensure chart.ctx exists during deferred updates #14

Closed BR0kEN- closed 3 years ago

BR0kEN- commented 4 years ago

Ensure the chart instance is still alive. It may have been destroyed during a delay and calling chart.update() will fail. The most common reason for such scenario is user navigation.

Steps:

After the second step both chart.ctx and chart.canvas won't exist.

Note that chart.canvas is a reference of chart.ctx.canvas.

Fixes #13, #16

simonbrunel commented 3 years ago

Merged in ed96880df3a93490c05fda44942334ce0bdabf83.

Thanks a lot @BR0kEN-!