Open Raphyyy opened 1 year ago
Clearly a bug.
For your use case it should be fine if you just not touch the z of the bar series.
Clearly a bug.
For your use case it should be fine if you just not touch the z of the bar series.
Unfortunately I need to use z value for other stuff, like disabling emphasis state on chart hovering (https://github.com/apache/echarts/issues/14952#issuecomment-842730046). I also want my Threshold to appears on top of my line and scatter series, not only bars, and I have charts with plenty of series.
The default z for MarkLine is 5 (see source) and is probably not incremented with its parent's z-value.
want my Threshold to appears on top of my line and scatter series
One workaround to this bug is to use fractional z values for main series - Demo Code. This allows for hundreds of z-planes to work with between the defaults z:0 and z:5.
Thanks for the workaround @helgasoft Unfortunately for me it's still not a good solution as I also have some charts with markArea and I need it to stay in the background. You can see in the following image that the line and the bar serie stay behind the markArea.
I guess I'll just make z
value start incrementing from 5 if I have a markArea serie, as the threshold bar will not likely to be displayed at the same time (our users can fully customize their charts).
1.When markLine and markPoint are set on a line at the same time, the hierarchy of the two cannot be modified through z, and the z of markPoint is always greater than the z of markLine.
2.markLine and markPoint are set respectively for two different lines. After the zlevel of the two lines is changed, the z of markPoint is always greater than the z of markLine.
Version
5.4.3
Link to Minimal Reproduction
https://jsfiddle.net/sujatve5/
Steps to Reproduce
https://jsfiddle.net/sujatve5/
Current Behavior
If
z
value is set to a value greater than 5 on any serie in the chart,markLine
will always be hidden by the seriesExpected Behavior
markLine
should follow thez
value of its parent serie to be on topEnvironment
Any additional comments?
When
z
has to be defined on multiple series, there is no way to make amarkLine
to be above of the rest. Either themarkLine
is defined on a serie with data or in a new serie with a higherz
doesn't change anything. I need to setz
value on my series as I want my bar series to be bellow my line and scatter series. I also usez
to define a specific order with series of the same type.The thing is that
markLine
doesn't seems to care about anyz
. It seems to have a hard definedz
of 5 for the line and az
of 6 for its label. In the example, if you set thez
of the first bar serie to 4, the markLine and its label goes well in front. But that is not suitable as you can have multiple serie with higherz
.The same goes for markArea or markPoint. Setting a higher
zlevel
on the serie with markLine doesn't help neitherThis use case sounds pretty standard. I just want to show a threshold bar above my series.
I came accross every issues opened about this subject and it looks like it has been a problem for a while now (since 2017) : https://github.com/apache/echarts/issues/6690 https://github.com/apache/echarts/issues/9974 https://github.com/apache/echarts/issues/12629 https://github.com/apache/echarts/issues/14190