stan0401
Posts: 8
Joined: Thu Mar 30, 2023 4:08 am

stacked bar data labels all to the right

Hi,

I'm having the following code for my stacked horizontal bars. https://jsfiddle.net/o0a5pjhc/
Right now, the data label is inside the bar and placed on the right side of the each bar.
Is it possible to have the labels placed on top of the bar, and all the way to the right (not to the right of the bar, but at the same line as the x_axis categories)?
jakub.j
Posts: 1091
Joined: Tue Jan 24, 2023 11:14 am

Re: stacked bar data labels all to the right

Thanks for contacting us with your question!

You can change the yValue of the dataLabels by setting dataLabels.y, you can also set the yValue on a single point.

I prepared a demo to show you how it can be done, I also change the yValue of the xAxis categories so that the data labels can fit below.

Demo: https://jsfiddle.net/BlackLabel/rcsagy92/

Feel free to ask any further questions!
Best regards
Jakub

Return to “Highcharts Usage”