Bar Chart with markline (setting by x and yAxis), markline not being clipped correctly when out of range
Version
4.8.0
Reproduction link
http://jsfiddle.net/mzjLw82a/14/
Steps to reproduce
As the reproduction link show,the markline yAxis is set to 100 when max range of yaxis is 18, and the markline is not clipped(it still shows in chart) but when we set the series type to 'line', the markline will be clipped as expect something strange: when set x-position by xAxis, the markline will be clipped as expect
What is expected?
markline setting by x and yAxis will being clipped correctly when out of range
What is actually happening?
markline setting by x and yAxis not being clipped correctly when out of range
我知道可以设置单个data来实现markline,但是目前由于需要修改markline 开始和结束的symbol 所以不得不使用数组来进行实现
Hi! We've received your issue and please be patient to get responded. 🎉 The average response time is expected to be within one day for weekdays.
In the meanwhile, please make sure that you have posted enough image to demo your request. You may also check out the API and chart option to get the answer.
If you don't get helped for a long time (over a week) or have an urgent question to ask, you may also send an email to [email protected]. Please attach the issue link if it's a technical question.
If you are interested in the project, you may also subscribe our mailing list.
Have a nice day! 🍵
From what it looks like they do not plan on implementing it: https://github.com/apache/echarts/issues/8796#issuecomment-410164328
I'll quote the message by @Ovilia here:
Thanks @amittonge . It's true that axis range will not automatically change due to markline data. I believe this makes sense since markline is served as a mark rather than data. And if the related data is not in the range, the markline is designed to be hidden. We recommend you set max to the data value related to the markline you want to display.
While I do agree with her statement I think there should be the option to enable taking into account markLines and markPoints. , since it is normal to use them to mark important things such as targets and therefore it makes sense to show them even if they are outside the data's range. Maybe add a helper in the max/min of the xAxis and yAxis similar to 'dataMin' and 'dataMax' (like 'chartMax' and 'chartMin'?).
The current problem with a workaround (which is just specifying the max value yourself) is that then the axis interval is not respected (see image below, where the interval is 20 but the max is set to 110):

Any update on this one?