chartjs-plugin-datalabels
chartjs-plugin-datalabels copied to clipboard
Feature Request: property that allows the hiding of labels if they cannot visibly fit within the width/height of the bar.
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.
Seems like display: 'auto' might work here?
https://chartjs-plugin-datalabels.netlify.app/guide/positioning.html#visibility