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

Stack labels on graphs - when legend is on the right & there are negative values, stack labels include the legend width when trying to align themselves #17116

Closed
KurveLauren opened this issue Mar 22, 2022 · 1 comment · Fixed by #18207

Comments

@KurveLauren
Copy link

Expected behaviour

I should see my labels aligned at the end of each bar

Actual behaviour

When the legend is on the right and there are values that are negative, the stack labels seem to include the legend width when trying to align themselves, which is causing so much space on the right of the smaller bars and the labels don't show for the largest one.

Live demo with steps to reproduce

http://jsfiddle.net/guwefdac/2/

Product version

Highcharts v8.2 & v10

Affected browser(s)

All

@pawellysy
Copy link
Contributor

pawellysy commented Mar 23, 2022

Hi KurveLauden, thanks for reporting a bug!

Simplified demo: https://jsfiddle.net/BlackLabel/va52Lzxe/

Internal Note

The position of the label is wrongly calculated here:

public setOffset(

Workaround

https://jsfiddle.net/BlackLabel/sk53fdzp/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants