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
{{ message }}
Repository navigation
Lines and mark areas disappear during zooming #14835
While zooming on line graphs the lines break apart, this is same issue as #3637. I have decided to submit this issue because that one is closed but the issue definitely still exists.
What is expected?
Lines stay connected after zooming.
What is actually happening?
Lines become disconnected while zooming
This issue has being going on for years it looks like, any help or a fix would be great.
Reacted by Stefano Sega, ruoyun-wu-tfs, Szilard DOBAI, Yue JIN, Zamlos, Daniel Ratzinger and Martin Catheland
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 it contains a minimum reproducible demo and necessary images to illustrate. Otherwise, our committers will ask you to do so.
A minimum reproducible demo should contain as little data and components as possible but can still illustrate your problem. This is the best way for us to reproduce it and solve the problem faster.
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.
I have found the issue that causes it on my end, having yAxis type set to 'log' causes the bug, if I remove it, everything is fine. I would definitely like to keep the log scale on the y-axis is anyone has any ideas.
I indeed believe this issue still exists: markLines defined by two points disappear when zooming in, as at least one of the points is out of the zoomed window, and even with the filterMode: 'none' option.
A possible workaround could be to hook on the 'datazoom' event and save the zoom state:
and then proceed to recalculate the chart's options, using the zoomState.startValue and zoomState.endValue as the boundaries of the markLines (I would add +1 to the startValue and -1 to the endValue to make sure we're within the zoomed window). Not ideal, but does the job.
this is a serious problem! It is possible to create a markLine with a single point that spans the entire xAxis (time series) where xAxis zoom works fine and the markLine doesn't disappear, but when you want to specify the start point and end of xAxis markLine, the markLine disappears when zooming in the xAxis and there is no solution Zoom filters options do not work!. Now I need to hack the solution, this issue has been open since 2021 and is still not resolved. Is a fix coming?
hi @Hentra I suspect the reason lines are dissapearing is there is distance between the 2 points you are using and may have been deliberate to optimise rendering performance. If you need the lines to remain visible across scrolling, what I did to solve the issue is added additional points in the line to keep the lines visible. it is a bit of a hack but solved the issue for me. So for example if you have 2 points in a line, perhaps increase the line to contain 4 points along the same slope in the series. Hope this helps
@brianedwardsaunders Thanks for your help. I was thinking about doing the same thing but the trendline is only accepting two points. Another workaround would be to use multiple small trendlines but those also result in small gaps at the end. The next thing I'm going to try is to hook into the dataZoom event and change the points to be right at the border, but I feel like this is still a hack.
Activity
echarts-bot commentedon Apr 28, 2021
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 it contains a minimum reproducible demo and necessary images to illustrate. Otherwise, our committers will ask you to do so.
A minimum reproducible demo should contain as little data and components as possible but can still illustrate your problem. This is the best way for us to reproduce it and solve the problem faster.
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! 🍵
dthunn commentedon Apr 28, 2021
I have found the issue that causes it on my end, having yAxis type set to 'log' causes the bug, if I remove it, everything is fine. I would definitely like to keep the log scale on the y-axis is anyone has any ideas.
locinus commentedon Aug 22, 2021
I indeed believe this issue still exists: markLines defined by two points disappear when zooming in, as at least one of the points is out of the zoomed window, and even with the filterMode: 'none' option.
A possible workaround could be to hook on the 'datazoom' event and save the zoom state:
and then proceed to recalculate the chart's options, using the zoomState.startValue and zoomState.endValue as the boundaries of the markLines (I would add +1 to the startValue and -1 to the endValue to make sure we're within the zoomed window). Not ideal, but does the job.
kingyue737 commentedon Apr 3, 2023
This bug still exists in v5.4.2. markline should not be filtered
Zamlos commentedon Apr 24, 2023
This bug still exists. Please, reopen the ticket.
Comee commentedon May 22, 2023
Below is a demo to show the problem.
Demo
electroheadfx commentedon Aug 29, 2023
This demo @Comee show the MarkLine disappear when I zoom in. The issue still there.
984803909 commentedon Sep 21, 2023
The problem still exists. Is there any other alternative method for directly connecting the two points
electroheadfx commentedon Sep 21, 2023
just use line series
brianedwardsaunders commentedon Oct 12, 2024
this is a serious problem! It is possible to create a markLine with a single point that spans the entire xAxis (time series) where xAxis zoom works fine and the markLine doesn't disappear, but when you want to specify the start point and end of xAxis markLine, the markLine disappears when zooming in the xAxis and there is no solution Zoom filters options do not work!. Now I need to hack the solution, this issue has been open since 2021 and is still not resolved. Is a fix coming?
electroheadfx commentedon Oct 13, 2024
maybe add it for 6.0 ?
mimers commentedon Nov 26, 2024
it's 2024, and still not fixed.
752841728 commentedon Mar 12, 2025
This issue is not solved
Hentra commentedon Mar 13, 2026
I can also still reproduce this issue. Is there a proposed way forward? Is this expected behaviour or can we work on a solution?
brianedwardsaunders commentedon Mar 13, 2026
hi @Hentra I suspect the reason lines are dissapearing is there is distance between the 2 points you are using and may have been deliberate to optimise rendering performance. If you need the lines to remain visible across scrolling, what I did to solve the issue is added additional points in the line to keep the lines visible. it is a bit of a hack but solved the issue for me. So for example if you have 2 points in a line, perhaps increase the line to contain 4 points along the same slope in the series. Hope this helps
Hentra commentedon Mar 13, 2026
@brianedwardsaunders Thanks for your help. I was thinking about doing the same thing but the trendline is only accepting two points. Another workaround would be to use multiple small trendlines but those also result in small gaps at the end. The next thing I'm going to try is to hook into the dataZoom event and change the points to be right at the border, but I feel like this is still a hack.