Skip to content

stackLabels with xAxis.left - wrong position #16764

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

Closed
raf18seb opened this issue Dec 6, 2021 · 0 comments · Fixed by #18207
Closed

stackLabels with xAxis.left - wrong position #16764

raf18seb opened this issue Dec 6, 2021 · 0 comments · Fixed by #18207

Comments

@raf18seb
Copy link
Contributor

raf18seb commented Dec 6, 2021

The stackLabels x position is incorrect when xAxis.left is set.
Works fine with the first xAxis, fails with multiple axes (second, third...)

This ticket might be treated as a continuation of #11500, where it was fixed only for the first xAxis.

A similar problem occurs when xAxis.opposite is set. See our official demo with stackLabels added: https://jsfiddle.net/BlackLabel/9eq238ph/
The fix for this will be applied in the same place (y position has to be corrected by chart.plotLeft).

Live demo with steps to reproduce

https://jsfiddle.net/BlackLabel/omu6x3pa/

Workaround

Add information about used xAxis onto a StackItem (line 58), then use it to calculate the correct position (line 147).
Demo: https://jsfiddle.net/BlackLabel/g50sn7or/

Product version

9.3.2

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

Successfully merging a pull request may close this issue.

2 participants