-
-
Notifications
You must be signed in to change notification settings - Fork 838
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Plugins not working in v4 #782
Comments
Lines 80 to 99 in 5c9a69c
Which plugins are you trying to use? |
Hi together, thanks for the quick response! I am using a custom plugin, completely reduced it just for the case of debugging this. I'm a little bit confused right now, but I'm also not a chart.js expert, so maybe I'm also completely on the wrong track… but here is a minimal repo: https://github.com/mgrsskls/vue-chartjs From my understanding you should get an alert, but that's not the case. I tried both cases: passing a When I look at https://www.chartjs.org/docs/latest/developers/plugins.html, the plugins should be passed as an array via the chart options. The |
@mgrsskls thanks for your repo. Yes, it's my mistake. Sorry. |
change chart plugins type from object to array, fix tests and examples #782
change chart plugins type from object to array, fix tests and examples #782
@thabarbados how does the new version support plugins like https://www.chartjs.org/chartjs-plugin-annotation/latest/ ? When I tried to register it to Chartjs I get a maximum call stack exceeded error. |
@jrahim54 I need some time to understand why this is happening. After that, I will release a bug fix or make a new feature with support for such plugins. |
No need to be sorry! :) Thanks for the quick fix, works for me! |
changing vue2 charts instance type to be compatible with chartjs-plugin-annotation #782
changing vue2 charts instance type to be compatible with chartjs-plugin-annotation #782
I'm still having the type error with "chartjs-plugin-annotation": "^3.0.1", "chart.js": "^4.4.3", and "vue-chartjs": "^5.3.1".
|
Expected Behavior
Plugins should be executed when passing to a chart component via
:plugins="plugins"
.Actual Behavior
Plugins are not executed.
I think this is because plugins is not added to the chart configuration here:
vue-chartjs/src/BaseCharts.ts
Lines 125 to 132 in 5c9a69c
As you can see on https://www.chartjs.org/docs/latest/developers/plugins.html,
plugins
should be an array in the configuration object (second param).Or am I missing something?
Thanks a lot!
Environment
The text was updated successfully, but these errors were encountered: