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

Feature Request: property that allows the hiding of labels if they cannot visibly fit within the width/height of the bar. #367

Open
DaveCole opened this issue Jan 26, 2023 · 1 comment

Comments

@DaveCole
Copy link

When using a stacked horizontal bar chart, there are many cases where a label from one bar overlaps another, which can be misleading and visually unappealing. It would be really nice to have an option that detected this and hid the offending label. Bonus points if one could invert the colors of a label if it fell outside of the bar at the end of the stack.

@getify
Copy link

getify commented Sep 20, 2023

Seems like display: 'auto' might work here?

https://chartjs-plugin-datalabels.netlify.app/guide/positioning.html#visibility

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

2 participants