chartjs / chartjs/chartjs-plugin-deferred

If ChartJS animation is disabled, this plugin crashes my web app

Open
#36 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
113
Forks
20
PR merge metrics
No merged PRs in 30d

Description

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).

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.