You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If you have multiple InfiniteLine items with enabled labels (i.e. InfLineLabel), it is not possible to make all the labels appear in front of all the lines.
Problem
To illustrate the problem you can use the code below. It displays two lines, each with a label. If you move the lines close to each other, you can get something like this:
Here I would like to be able to make the blue label appear in front of the red line. But this should not result in the red label being placed behind the blue line.
In short, I want to have all labels always in front of the lines.
With this example this might seem as a rather unimportant problem, but if you have lots of lines with labels, you run pretty fast in a situation where your labels are hidden by one or more lines and become unreadable.
Possible solution
The problem with the current implementation is, that the InfLineLabel items are child items of their InfiniteLine item. Therefore, changing the zValue doesn't help here.
The only solution I see is to remove the parent-child-item relationship between an InfiniteLine and its attached InfLineLabel.
If they become then siblings, one can use the zValue to control the stacking order. I guess, the default behaviour (default stacking order) could be kept as it is now.
If this feature would be welcome, I could try to come up with a PR.
If you have multiple
InfiniteLine
items with enabled labels (i.e.InfLineLabel
), it is not possible to make all the labels appear in front of all the lines.Problem
To illustrate the problem you can use the code below. It displays two lines, each with a label. If you move the lines close to each other, you can get something like this:
Here I would like to be able to make the blue label appear in front of the red line. But this should not result in the red label being placed behind the blue line.
In short, I want to have all labels always in front of the lines.
With this example this might seem as a rather unimportant problem, but if you have lots of lines with labels, you run pretty fast in a situation where your labels are hidden by one or more lines and become unreadable.
Possible solution
The problem with the current implementation is, that the
InfLineLabel
items are child items of theirInfiniteLine
item. Therefore, changing thezValue
doesn't help here.The only solution I see is to remove the parent-child-item relationship between an
InfiniteLine
and its attachedInfLineLabel
.If they become then siblings, one can use the
zValue
to control the stacking order. I guess, the default behaviour (default stacking order) could be kept as it is now.If this feature would be welcome, I could try to come up with a PR.
Code example
The text was updated successfully, but these errors were encountered: