chartjs / chartjs-plugin-deferred

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

Uncaught TypeError: Cannot read property 'plugins' of undefined #19

Closed jakobgreenfeld closed 2 years ago

jakobgreenfeld commented 3 years ago

When I'm trying to use the plugin I'm always getting the error:

Uncaught TypeError: Cannot read property 'plugins' of undefined

I'm using

<script src="https://cdn.jsdelivr.net/npm/chartjs-plugin-deferred@1.0.2/dist/chartjs-plugin-deferred.min.js"></script>

and

<script src="https://cdn.jsdelivr.net/npm/chart.js@3.1.1/dist/chart.min.js"></script>

Here's a fiddle that illustrates the error https://jsfiddle.net/aqgst865/

ChunaoLiu commented 2 years ago

I am having this issue as well while attempting to import the package.

LeeLenaleee commented 2 years ago

This is because version 1 of the plugin only works with chart.js version 2.

There should be a beta being released soon for the plugin that is compatible with chart.ja version 3 since this pr has been merged: #21

simonbrunel commented 2 years ago

Version 2.0.0-beta.1 has been released and is compatible with Chart.js v3.