Getting dependency error while installing 'chartjs-plugin-datalabels' #9310
Unanswered
NandhiniMuthuramalingam
asked this question in
Q&A
Replies: 1 comment 5 replies
-
You need to install the beta of the datalabels plugin since that's the only version that supports V3 ATM, you do this by adding @next behind the packagename if you install it, also you don't have to use the @types package anymore since chart.js V3 comes with build in typing |
Beta Was this translation helpful? Give feedback.
5 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hello All,
How to build a doughnut chart only using chart.js and typescript?
I have the following versions
"chart.js": "^3.3.2" and "@types/chart.js": "^2.9.32".
I am able to display the chart. But I want to achieve the below requirements as well.
Display text inside the doughtnut chart
Display DataLabels in each segment
Need to change the color of hidden legend instead of Strike-Through
I am getting the dependency error when I try to install npm chartjs-plugin-datalabels.
npm ERR! node_modules/chart.js
npm ERR! chart.js@"^3.3.2" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer chart.js@">= 2.7.0 < 3" from chartjs-plugin-datalabels@1.0.0
npm ERR! node_modules/chartjs-plugin-datalabels
Any suggestion please to resolve this issue?
Thanks!
Beta Was this translation helpful? Give feedback.
All reactions