locinus edited a comment on issue #14835:
URL: https://github.com/apache/echarts/issues/14835#issuecomment-903303711


   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:
   
   const zoomState = {};
   
   ```
   echartsInstance.on('datazoom', (event) => {
     const option = echartsInstance.getOption();
     if(option.dataZoom && Array.isArray(option.dataZoom) && 
option.dataZoom.length > 0) {
       zoomState.startValue = option.dataZoom[0].startValue;
       zoomState.endValue = option.dataZoom[0].endValue;
     }
   });
   ```
   
   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 an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@echarts.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@echarts.apache.org
For additional commands, e-mail: commits-h...@echarts.apache.org

Reply via email to