Skip to content

stackLabels with xAxis.left - wrong position #16764

Description

@raf18seb

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions