DavideViolante / chartjs-plugin-labels

Plugin for Chart.js to display percentage, value or label in Pie or Doughnut.
MIT License
55 stars 18 forks source link

How to position label on stacked bar chart? #19

Open zedar187 opened 1 year ago

zedar187 commented 1 year ago

I'm having a stacked bar chart and want to display the percentage at the top, but only for one dataset. Here's a screenshot of the current situation:

charts

With a custom render function I've hidden the values of the top-stacked bar. Now I'd need to have the percentage of the lower bar at the top of the canvas. For example at the height/level of the 1,600 mark. Is this possible?

Edit: maybe having the labels at position:absolute; top:0; or something alike would work.