chartjs/chartjs-plugin-deferred

Having trouble getting plugin working inside of Vue.js

amfischer opened this issue · 2 comments

I can't seem to get this plugin working inside a Vuejs environment on my local computer. I'm using Chartjs 2.7.2, vue-chartjs 3.4.0, vue 2.5.17, and chartist-plugin-deferred 1.0.1

I did successfully get it to work inside of Vuejs in a jsfiddle: https://jsfiddle.net/amfischer/eywraw8t/320627/

Here is a simplified repo of the fiddle, and can't for the life of me figure this out: https://github.com/amfische/vue-chartjs-plugin-deferred

I would greatly appreciate any help.

@amfische I'm very sorry, I totally missed your ticket, did you figured out what was your issue (I hope so)?

In your vue-chartjs-plugin-deferred repository, I can't find where the plugin is imported.

@simonbrunel thank you for the reply, it pointed me in the right direction! After tinkering around this morning my issue was because the plugin was not imported. My fiddle example uses the CDN so I didn't account for that.

I found these questions to be helpful in figuring this out:

chartjs/chartjs-plugin-datalabels#10

apertureless/vue-chartjs#94

The vue-chartjs documentation is a little hard to figure out imo, but here is their section on plugins:

https://vue-chartjs.org/api/#addplugin

I updated my repository in case anyone stumbles upon it, but the two Github issues linked above give clear examples on how to incorporate plugins.