chartjs-plugin-deferred
chartjs-plugin-deferred copied to clipboard
If ChartJS animation is disabled, this plugin crashes my web app
My web app (Nuxt) crashes when using this plugin (v2.0.0) and disabling ChartJS (v4.4.7) animations.
FAILS (A) - my nuxt web app crashes with a 500 error:
(ChartJS instance)
options: {
// ...
plugins: {
deferred: {
xOffset: 150,
yOffset: '50%',
delay: 500
}
},
// ...
animation: false, // Animations are disabled via this ChartJS option
// ...
}
WORKS (B) - The app works like normal if not disabled animation
options: {
// ...
plugins: {
deferred: {
xOffset: 150,
yOffset: '50%',
delay: 500
}
},
// ...
}
WORKS (C) - The app works like normal if I exclude this plugin and disable animations
options: {
// ...
animation: false, // ChartJS option that toggles animations
// ...
}
Maybe I'm overlooking something but it seems like this plugin doesn't first detect whether ChartJS animations are disabled, before running more logic (case A).