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

Problem display datalables using Chart.js 4.4.0 #402

Open
2uk3y opened this issue Nov 9, 2023 · 2 comments
Open

Problem display datalables using Chart.js 4.4.0 #402

2uk3y opened this issue Nov 9, 2023 · 2 comments

Comments

@2uk3y
Copy link

2uk3y commented Nov 9, 2023

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
Copy link

Discussions > Q&A might be a better place for this one?

@stockiNail
Copy link
Contributor

@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

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

3 participants