Problem display datalables using Chart.js 4.4.0
2uk3y opened this issue · 2 comments
2uk3y commented
I have problem to display datalables on top of each bar.
using Chart.js 4.4.0 and chartjs-plugin-datalabels 2.2.0.
here is the code that i try that not working.
https://codepen.io/2uk3y/pen/rNPyPgW
any mistake?
peteruithoven commented
Discussions > Q&A might be a better place for this one?
stockiNail commented
@2uk3y maybe I'm wrong but you haven't registered the plugin.
Chart.register(ChartDataLabels);
See doc: https://chartjs-plugin-datalabels.netlify.app/guide/getting-started.html#registration
Adding it, your codepen sounds working.
Created a copy of yours here: https://codepen.io/stockinail/pen/oNmJeyp