chartjs-plugin-labels icon indicating copy to clipboard operation
chartjs-plugin-labels copied to clipboard

Not working on latest chartjs? (edit: working version inside)

Open DavideViolante opened this issue 4 years ago • 7 comments

Does it work on chartjs v3.2.1?

chartjs-plugin-labels.js:433 Uncaught TypeError: Cannot read property 'register' of undefined
    at chartjs-plugin-labels.js:433
    at chartjs-plugin-labels.js:490

edit

Working version here, install with: npm i chart.js-plugin-labels-dv

DavideViolante avatar May 19 '21 11:05 DavideViolante

I tried to replace Chart.plugins.register({ with Chart.register({, no error in console now, but is not working yet. Someone knows how to make it work on chartjs v3?

DavideViolante avatar May 19 '21 11:05 DavideViolante

Same issue. After running npm i chartjs-plugin-labels, I get the following error:

npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR! 
npm ERR! While resolving: ########
npm ERR! Found: [email protected]
npm ERR! node_modules/chart.js
npm ERR!   chart.js@"^3.2.1" from the root project
npm ERR! 
npm ERR! Could not resolve dependency:
npm ERR! peer chart.js@"^2.6.0" from [email protected]
npm ERR! node_modules/chartjs-plugin-labels
npm ERR!   chartjs-plugin-labels@"*" from the root project

iamjoshhansen avatar May 19 '21 19:05 iamjoshhansen

Finally made it work with Chart.js v3 here: https://github.com/DavideViolante/chartjs-plugin-labels I don't even open a PR since I doubt it will be merged, this repo has no updates since 3 years... but I try to send an email to author.

edit: author doesnt reply.

edit: see diff here if you are curious.

DavideViolante avatar May 26 '21 21:05 DavideViolante

Finally made it work with Chart.js v3 here: https://github.com/DavideViolante/chartjs-plugin-labels I don't even open a PR since I doubt it will be merged, this repo has no updates since 3 years... but I try to send an email to author.

edit: author doesnt reply.

Thanks so much!

letsgo247 avatar Jun 11 '21 15:06 letsgo247

Finally made it work with Chart.js v3 here: https://github.com/DavideViolante/chartjs-plugin-labels I don't even open a PR since I doubt it will be merged, this repo has no updates since 3 years... but I try to send an email to author.

edit: author doesnt reply.

Thanks bro

rizkyanfasafm avatar Jul 28 '21 01:07 rizkyanfasafm

Finally made it work with Chart.js v3 here: https://github.com/DavideViolante/chartjs-plugin-labels I don't even open a PR since I doubt it will be merged, this repo has no updates since 3 years... but I try to send an email to author.

edit: author doesnt reply.

Thank you!!! I'm new to JavaScript and I thought I was doing something wrong, so thank you for saving my sanity!

jknaust avatar Sep 15 '21 21:09 jknaust

Thanks bro, made my day! 👍🏻

deprincipia avatar Jun 23 '23 09:06 deprincipia