-
-
Notifications
You must be signed in to change notification settings - Fork 832
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
Chart.js 3.0 support #695
Comments
First observed error 👍 |
I encountered the same problem... Is there a way to ignore this problem and show the charts anyway before the new release? |
|
Hi, Team. When do you plan to upgrade to V3? |
Following the doc now will result in an error because of v3, the doc should change to Or v3 support should be added |
Thanks! you saved my day! |
Thank you so much! You make my day 😘 |
@AlexVapniaruk Did that work? |
Yes, downgrade chart.js to v2 will help with Warning and issue with chart display. |
Just spent a couple of hours trying to understand why this was happening. Anyone who recently downloaded the package will be hitting this. The workaround of downgrading to v2 worked. Would be good if the documentation on vue-chartjs.org could be updated to reflect this until v3 support lands. |
Came here after using 3.2.0 and searching for Downgrading to EDIT: Just realized Vue3 isn't supported. Sadness ensues. |
In BaseChart.js rewrite the import
into
You have also to change the code to match the new options syntax in v3 (expecially for the axes/scales) |
The upgrade to Charts.js 3 is needed for security reasons as well. Charts 2.9.4 (last 2.x release) has not been patched with critical vulnerability fixes. |
@mfoschian Thank you very much. I don't get the error anymore, but renderChart doesn't seem to be working. Do I need to resolve this error? |
@hajime9652 : can you share a simple project for futher investigation ? Usually I don't work in ts but in js. |
Hi,
Does anyone know how to solve it? |
@mfoschian |
@lpeinado I also got this error when I downgraded. It was fixed by restarting vue. |
@apertureless Any indication on when Chart.js 3 will be supported? What is missing on vue-chartjs' side? |
Well, whats currently missing is simply time to properly review and rewrite vue-chartjs to be compatible with chart.js v3. There are several points that need to be considered and tested. 1. New tree-shakeable importsMost simple solution would be 2. TypescriptChart.js 3 comes now with its own typings, so no need to use 3. Custom ChartsChart.js v3 also changed the way you can create custom chart types. So I will need also to investigate on how to translate it into vue-chartjs. 4. Build SystemWhile working on point 1. I ran into some issues, which may or may not be related to webpack. This project is still using webpack 3, which should be maybe updated to utilize all new features. But I think everyone knows that this is also a deep rabbit hole. Because the whole build process needs to be rewritten. I need to make sure, that the release build is working with current bundlers and setups (some people still use browserify, gulp, grunt, webpack, rollup etc.) and also that it works as a browser build. 5. DocumentationDepending on the points above, the usage of vue-chartjs may change, so the documentation needs to be updated. At least the way how custom charts are created will change. There are also some breaking changes in chart.js which need to be taken into account, like removing the HorizontalBar chart. 6. Other breaking changesBecause this is a breaking change, I will also include some of the older long-running issue which are breaking like #504 and also a rewrite of the reactivity mixins, because 90% of the issues here (which are not questions about usage or chart.js specific questions) are based on the reactivity mixins not working as they should. So, you see there are a lot of todos and currently I don't have much time to investigate. So it is moving slowly. |
@apertureless Is there a branch we can contribute on for v3 support? |
There's an alternative if you want chartsjs v3. |
@toniengelhardt if you are asking if the chart is reactive with data change, according to what I read from the documentation, I dont think it is reactive. But i if you want the chart to update when you change data then you should follow their documentation here: |
That is you must always call the chart.update() method. Please let me know if my answer is clear. |
@Iwakinomotoye yes it is, thanks! |
Tbh that is not et all the vue reactive way, and not the answer to the
initial question ;)
Toni ***@***.***> schrieb am So., 12. Sept. 2021, 18:16:
… @Iwakinomotoye <https://github.com/Iwakinomotoye> yes it is, thanks!
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#695 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AACHVVZC5NPIJFZE4INFGVTUBTG6JANCNFSM42KIXCQA>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
|
Still having the same error. Update: use |
@onurusluca Thank you so much, it worked out at once! while none of solution above doesn't work ;-). |
@digitalkaoz I'm with you. |
@apertureless Is there going to be ChartJs 3.x support? Otherwise I will have to migrate soon |
@onurusluca Uncaught (in promise) TypeError: createElement is not a function tried everything, chart 2.9.4 |
Heads up for everyone waiting for 3.x support: I've migrated to ChartJS 3.5 and while it's a lot of work, it's worth it (stacked scales, multi color lines, ...). I wouldn't wait for an update for this lib as most of the migration work will have to be done anyway. @apertureless thank you for your work on this component, it was really helpful to me! |
Thanks bro it works now |
Bump, v3 support is really necessary. |
I have
One instance of any chart and multiple charts of different types (i.e., 1 bar, 1 line) works perfectly. However, trying to display 2 or more charts of the same type results in Have I coded myself into a corner? Suggestions most welcome. I followed this repo as an example. EDIT: |
Here is my Vue2/Nuxt2 component for using ChartJS v3. I'm a newbie in Vue's world so the code could be probably improved |
Any news on supporting Chart.js Or is it better to throw away Thank you, |
@sneko I'm with @thabarbados working on refreshing the project's infrastructure, after that we going to upgrade the code to make it compatible with chart.js v3 |
@sneko There's been replacement for like 4 months already. |
Chart.js 3 breaks the vue-chartjs package. See vue-chartjs issue #695: apertureless/vue-chartjs#695
A new version 4.0.0 of vue-chartjs with Chart.js 3 support is already available on npm. |
Were you able to fix this |
It still working for React and Next projects ! Thanks |
Chart.js 3.0 is out now
The text was updated successfully, but these errors were encountered: