chartjs/chartjs-plugin-deferred

Uncaught TypeError: Cannot read property 'plugins' of undefined

jakobgreenfeld opened this issue · 3 comments

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/

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

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

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