You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@echarts.apache.org by GitBox <gi...@apache.org> on 2021/04/05 08:44:35 UTC

[GitHub] [echarts] symlons removed a comment on issue #14592: How to get a proper xAxis animation for realtime data?

symlons removed a comment on issue #14592:
URL: https://github.com/apache/echarts/issues/14592#issuecomment-813277981


   I resolved this issue just by using `min`. But I planned to use it in a dynamic setting, so I had then the issue that the data broke up too early like that:
   
   ![echarts](https://user-images.githubusercontent.com/63979635/113554484-b326ec80-95f9-11eb-8665-ee64b868828f.gif)
   
   But as it turned out this issue wasn't due to setting min dynamically. Shifting the data too early lead to that issue.
   So instead of shifting the data before pushing new data you should do it like that: `data = data.slice(-initial_data-buffer)`.
   This prevents shifting all the data if buffer is chosen as big as new data should be updated. So finally you'll have a much smootehr animation:
   
   ![echarts_2](https://user-images.githubusercontent.com/63979635/113555574-6e9c5080-95fb-11eb-8baa-387ba084ca11.gif)
   
    


-- 
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:
users@infra.apache.org



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