apache / apache/echarts

[Bug] markLine / markArea / markPoint "z" value doesn't follow the value of its parent serie

Open
#19,108 5 comments 0 reactions 0 assignees View on GitHub
bug en pending
Dominant language
TypeScript
Stars
67.3k
Forks
19.8k
Avg merge
11d 14h
Merged PRs (30d)
8

Description

### 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 series

### Expected Behavior

`markLine` should follow the `z` value of its parent serie to be on top

### Environment

```markdown
- OS: Windows 10
- Browser: Chrome latest
- Framework: -
```

### Any additional comments?

When `z` has to be defined on multiple series, there is no way to make a `markLine` to be above of the rest.
Either the `markLine` is defined on a serie with data or in a new serie with a higher `z` doesn't change anything.
I need to set `z` value on my series as I want my bar series to be bellow my line and scatter series. I also use `z` to define a specific order with series of the same type.

The thing is that `markLine` doesn't seems to care about any `z`. **It seems to have a hard defined `z` of 5 for the line and a `z` of 6 for its label**. In the example, if you set the `z` 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 higher `z`.

The same goes for markArea or markPoint.
Setting a higher `zlevel` on the serie with markLine doesn't help neither

![image](https://github.com/apache/echarts/assets/13983107/fd3a9e34-318f-4957-b3fd-515424826e9e)

This 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

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.