plainheart commented on issue #14695:
URL: https://github.com/apache/echarts/issues/14695#issuecomment-826274009


   @pissang To find out why the tooltip is lagged and shakes from side to side, 
especially in the connected charts, I dug slightly into the related source 
code. Currently, I'm thinking it may be for the method 
`TooltipView#_updatePosition` will be very frequently called when `mousemove`. 
Only in 4ms, it seems to be called many times. The normal chart can work 
smoothly, but in the connected chart, it will become worse. As far, I tried to 
throttle the `_updatePosition` function in `50ms`(the tested result may need to 
validate), it's working better in both Chrome(with the devtools open) and 
Firefox even if we use the previous way `left/top`.
   
   Here is the demo using the ECharts lib based on this temporal solution, it 
seems to be working well in Firefox and Chrome with the devtools open. 
https://codepen.io/plainheart/pen/KKarOZb
   
   The branch for this change is 
https://github.com/apache/echarts/tree/fix-tooltip. Related test case is 
`tooltip-lag-glitch.html`.
   
   


-- 
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.

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