Skip to content
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

ChartJS Version 3: This NPM Package Appears to Work #38

Open
homestar9 opened this issue Dec 7, 2023 · 4 comments
Open

ChartJS Version 3: This NPM Package Appears to Work #38

homestar9 opened this issue Dec 7, 2023 · 4 comments

Comments

@homestar9
Copy link

homestar9 commented Dec 7, 2023

I, like many others here, ran into an issue using ChartJS version 3 and @nagix's colorschemes plugin. I use NPM + Webpack to manage my Javascript dependencies, so if you're looking for a working NPM package, I suggest checking out:
https://www.npmjs.com/package/chartjs-plugin-colorschemes-v3

The package is based on @m08pvv's fork of @zsu's fork of this repo. Kudos to both of them!

What about ChartJS Version 4?

I tested chartjs-plugin-colorschemes-v3, and unfortunately, it does not work with version 4. I spent a few hours trying to figure out the problem, but I hit a brick wall. Perhaps someone smarter than me can figure out why colorschemes won't register itself as a global plugin in version 4.

I hope that @zsu and @m08pvv update their repos to enable Issues so we can report bugs and such.

@zhu
Copy link

zhu commented Dec 8, 2023

I, like many others here, ran into an issue using ChartJS version 3 and @nagix's colorschemes plugin. I use NPM + Webpack to manage my Javascript dependencies, so if you're looking for a working NPM package, I suggest checking out: https://www.npmjs.com/package/chartjs-plugin-colorschemes-v3

The package is based on @m08pvv's fork of @zsu's fork of this repo. Kudos to both of them!

What about ChartJS Version 4?

I tested chartjs-plugin-colorschemes-v3, and unfortunately, it does not work with version 4. I spent a few hours trying to figure out the problem, but I hit a brick wall. Perhaps someone smarter than me can figure out why colorschemes won't register itself as a global plugin in version 4.

I hope that @zhu and @m08pvv update their repos to enable Issues so we can report bugs and such.

I think it should be @zsu in the last line.

@homestar9
Copy link
Author

Oops! You are correct. Sorry about that. I have updated the first post.

@ph33rtehgd
Copy link

ph33rtehgd commented Feb 8, 2024

I, like many others here, ran into an issue using ChartJS version 3 and @nagix's colorschemes plugin. I use NPM + Webpack to manage my Javascript dependencies, so if you're looking for a working NPM package, I suggest checking out: https://www.npmjs.com/package/chartjs-plugin-colorschemes-v3

The package is based on @m08pvv's fork of @zsu's fork of this repo. Kudos to both of them!

What about ChartJS Version 4?

I tested chartjs-plugin-colorschemes-v3, and unfortunately, it does not work with version 4. I spent a few hours trying to figure out the problem, but I hit a brick wall. Perhaps someone smarter than me can figure out why colorschemes won't register itself as a global plugin in version 4.

I hope that @zsu and @m08pvv update their repos to enable Issues so we can report bugs and such.

I believe I've figured out how to make this plugin (the v3 version 0.5.4) work in chart.js v4 (at least, it seems to work in my brief test of it).

Summary of the changes:

On line 10, removed ", global.helpers"
On line 11, remove ", helpers"
On lines 1124, 1132 and 1155, replace "helpers.color" with "Chart.helpers.color"

That was all I needed to do.

@MaximBelov
Copy link

#43

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants