Lines and mark areas disappear during zooming
See original GitHub issue问题简述 (One-line summary)
During zooming ECharts does not paint lines to chart boundaries if the target point is outside of the visible coordinate range. Mark areas however are painted to chart boundaries. But mark areas also disappear if both start and end coordinates of the mark area are outside the visible coordinate range.
版本及环境 (Version & Environment)
- ECharts 版本 (ECharts version): 3.2.0 / master branch
- 浏览器类型和版本 (Browser version): all
- 操作系统类型和版本 (OS Version): all
重现步骤 (Steps to reproduce)
- Open https://jsfiddle.net/wy0v5yqv/ or used options posted below
- Move left handle of zoom slider slightly to the right and left most line part will disappear (bad), but left most mark area still visible (good)
- Move right handle of zoom slider slightly to the left and right most line part will disappear (bad), but right most mark area still visible (good)
- Move right handle of zoom slider further to the right and remaining line part will disappear once its target point is out of zoom range (bad). Moving the handle even further to the right until the zoomed/visible range crosses the right edge of the left most mark area causes the left most mark area to disappear as well. Now you have an empty chart (bad).
期望结果 (Expected behaviour)
Lines and mark areas should be painted even if their points are outside of the zoomed area. If you don’t want that all the time, at least make it configurable.
可能哪里有问题 (What went wrong)
See “Steps to reproduce” above.
ECharts配置项 (ECharts option)
option = {
legend: {
data:['issue']
},
dataZoom: [
{ type: 'slider', show: true },
{ type: 'inside', show: true }
],
xAxis: {
type: 'time',
},
yAxis: {
type: 'value',
max: 50
},
series: [
{
name:'issue',
type:'line',
data:[
{name : "2016-01-01", value: ["2016-01-01 00:00:00", 5]},
{name : "2016-01-02", value: ["2016-01-02 00:00:00", 15]},
{name : "2016-01-03", value: ["2016-01-03 00:00:00", 25]},
{name : "2016-01-03", value: ["2016-01-05 00:00:00", 15]},
],
markArea: {
silent: true,
data: [
[
{ coord: ["2016-01-01 00:00:00", 5] },
{ coord: ["2016-01-01 23:59:59", 15] }
],
[
{ coord: ["2016-01-02 00:00:00", 10] },
{ coord: ["2016-01-02 23:59:59", 20] }
],
[
{ coord: ["2016-01-03 00:00:00", 15] },
{ coord: ["2016-01-03 23:59:59", 35] }
]
]
},
}
]
}
其他信息 (Other comments)
Issue Analytics
- State:
- Created 7 years ago
- Comments:24 (3 by maintainers)
Top Results From Across the Web
Lines and mark areas disappear during zooming #3637 - GitHub
Move right handle of zoom slider further to the right and remaining line part will disappear once its target point is out of...
Read more >Some of my feature lines disappear while zooming/p...
Some of my feature lines disappear while zooming/panning in data view. Any idea's on what I can do to fix issue??
Read more >Lines and Plines disapear when zooming - Autodesk Forums
When I scroll the mouse wheel to zoom in and out the lines are disappearing. I have to type REGEN for them to...
Read more >How to fix objects that disappear when zooming in ... - YouTube
A really short video for beginners showing how to fix objects that disappear when you zoom in or out of your scene. The...
Read more >Why do some features disappear at high zoom levels?
It's inevitable at some zoom level that dense points, lines, or polygon features become stacked on top of one another, with each feature...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Adding filterMode: none doesn’t resolve this problem for me. The mark line still disappears when zooming in.
Echarts Version: 4.6.0
Data Zoom Settings:
Line Series Object with MarkLine:
filtermode: 'none'
resolves the problem.