varnguyen
Posts: 22
Joined: Fri Jan 08, 2021 3:32 am

Highcharts Stacked bar config stackLabels 1 column on the right

Hi guys,

I have tried a few ways but was not been able to solve the problem like the topic.
Demo: https://jsfiddle.net/BlackLabel/Lht7dfuq/
Expected: https://ibb.co/WHTBm62

Please help me.
mateusz.b
Posts: 2006
Joined: Tue Jul 13, 2021 11:34 am

Re: Highcharts Stacked bar config stackLabels 1 column on the right

Hello varnguyen,

Thanks for contacting us with your question.

Could you please check link with expected results? It says that site doesn't exist.

Best regards!
Mateusz Bernacik
Highcharts Developer
varnguyen
Posts: 22
Joined: Fri Jan 08, 2021 3:32 am

Re: Highcharts Stacked bar config stackLabels 1 column on the right

Hi mateusz.b,

Sorry for the inconvenience
I would like to send you the expected photo
Expected: https://ibb.co/3mh9SrZ

Best regards
mateusz.b
Posts: 2006
Joined: Tue Jul 13, 2021 11:34 am

Re: Highcharts Stacked bar config stackLabels 1 column on the right

Hi varnguyen,

Thanks a lot for sharing that image. Just to make sure, do you want to move your stack labels to the right side of the chart (area painted on your image)?

Thanks for clarification.
Best regards!
Mateusz Bernacik
Highcharts Developer
varnguyen
Posts: 22
Joined: Fri Jan 08, 2021 3:32 am

Re: Highcharts Stacked bar config stackLabels 1 column on the right

Hi mateusz.b,

Yeah!
This is the exact picture I wanted
Expected: https://ibb.co/2cj4DsS

Thanks for your attention.

Best regards
mateusz.b
Posts: 2006
Joined: Tue Jul 13, 2021 11:34 am

Re: Highcharts Stacked bar config stackLabels 1 column on the right

Hello varnguyen,

There is no API option that could do that, but it is possible. My idea was to initally align all stack labels to the left side, to make sure that they are aligned in one line, and then translate whole group to the right site of the chart. Effect looks good to me and what is more important, the solution is responsive.
Demo: https://jsfiddle.net/BlackLabel/u8afhyLs/
API reference: https://api.highcharts.com/class-refere ... #translate

Let me know if that was what you were looking for!
Best regards!
Mateusz Bernacik
Highcharts Developer

Return to “Highcharts Usage”