You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@echarts.apache.org by "jinMingYang1 (via GitHub)" <gi...@apache.org> on 2024/09/24 09:21:41 UTC

[I] [Bug] 折线图动态更新时过渡动画失效,并没有从a点缓慢到b点,而是直接跳动 [echarts]

jinMingYang1 opened a new issue, #20369:
URL: https://github.com/apache/echarts/issues/20369

   ### Version
   
   5.5.1
   
   ### Link to Minimal Reproduction
   
   https://echarts.apache.org/examples/zh/editor.html?c=dynamic-data2&random=31bh95du7k&code=GYVwdgxgLglg9mABAJwIZgCZwLYBFVSoAUAlIgN4CwAUIomHAO6IC89Aps_lO0QNQNmfRAnb4AnogBUiAEwkA3IgD0yxIDyNQAVKgN9NAL6m7AKWmAYf8D5yoBpzQPRmIsGNTijgTlNAXHLXbkmbJp0AbqgA2IOysiL4BQcIAsgQAFgB0aJg4pNJyAIyIALSIqQAMCl4o7FAgyEhUtHT0qNjsAFz0TLFQcADKUMgwYADmpAA0BT7-gfUA2gOVI4KxXUUAYiB-fgCa7KjIfQ2M00URCFDRycKpvZvbUNy8JAC6sQBWcJ1EAOTKTyT9FZWIUfvxcOAYIihQIkcZXAoAX3y1AhNBofiKiAwBFQwRGV2hCKgm2CNi4BF4qQAnESAOwnIknADMinhiNEEmCsgALCkqQA2HI5FK5LmYxHAoJsH5xBJYbDJGS8vJw6iqRCAXCVANOagDRlQAOpoA7YxowDgyEQQLWiBgwTyRsQAB5slzTTA-HwyOU6MjCLEAA4gADOBzFOG4xBItJhsrgrtgCGCjsQsCgCPqkboPAAHlB6k9cOIwNUYBBEH7EAAyRAAFRgNUQAEFEzAPU9IR8E3A4H5YK64-N2jAujNkKnUFWa_XKjrkNgCDwe4hQJAw0giK61tUPQ7xnR52hsB7gmvFyMchiVyFDc6hRx8Tw5wuN7FMzVA186MgiiVZwenQSzhdDq_EC8nog-N-RDHmcuxgPshzZGQAGfPev7_t-wEzFA8yLCsaxfjBXx_qm8GYZU25XoKIypOCeF3pUEKDnQfbVgACg8YHsBO8aVOgpYEPAYD1MA_geuw4ywhUlEFImlbVm2MFQOIrp1D-sA1E8VGIAARv8mBrOIADiqCtogIxPDkACkik_gArEZTxXEpHqun4MBQAAMp0
 sksXQXpMNxvH8TBgl0MJFTiGJHoSV8UkyamgqKeMqkAhp2m6buJxPLyxlWeMNl2Y5zkhfe7mMJ5fh8QJdYFHxHTsMFenjK5VQ1KmsyoAA1kEfpRXhYWyU8dk2G196IHlLTiNgql-AVfFKW-hD1M6qDFRUpFQrK8qAFna2iAC9mgANppqNB8VAACSjHIKERBTtAnH6suFTDvqvh6sabA2haiCmUotr2hQ4wzbEXowMAUCkEo8qAN-egAmaYAAOaAOemgAhbttMFfe6XpED6eAoqQigqGogDftpoG1Q4A8WmAFzmsN-QU2DiAAwtEaxQN9RQAPKhpxRAsWVMAVaMB41ZNqDTSiB6-ZUpF-YGlFWlyihAA
   
   ### Steps to Reproduce
   
   以上示例
   
   ### Current Behavior
   
   更新没有过渡,直接跳动
   
   ### Expected Behavior
   
   过渡到最新点
   
   ### Environment
   
   ```markdown
   - OS:
   - Browser:
   - Framework:
   ```
   
   
   ### Any additional comments?
   
   _No response_


-- 
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-unsubscribe@echarts.apache.org.apache.org

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


Re: [I] [Bug] 折线图动态更新时过渡动画失效,并没有从a点缓慢到b点,而是直接跳动 [echarts]

Posted by "wiscgazf (via GitHub)" <gi...@apache.org>.
wiscgazf commented on issue #20369:
URL: https://github.com/apache/echarts/issues/20369#issuecomment-2577169772

   Yes, I had this problem too, and I wanted to implement something like a currency update by the second, incrementally updating too much instead of jumping straight to the latest value
   
   https://github.com/user-attachments/assets/c70871db-bacb-4719-a3f4-8175304af69c
   
   


-- 
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-unsubscribe@echarts.apache.org

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


Re: [I] [Bug] 折线图动态更新时过渡动画失效,并没有从a点缓慢到b点,而是直接跳动 [echarts]

Posted by "helgasoft (via GitHub)" <gi...@apache.org>.
helgasoft commented on issue #20369:
URL: https://github.com/apache/echarts/issues/20369#issuecomment-2835969702

   There is no mystery on how to draw smooth lines - they just need more points.
   Here is basic code to generate linear interpolation points.
   ```
   function intermediatePoints(start, end, numPoints) {
     const points = [];
     for (let i = 1; i <= numPoints; i++) {
       const t = i / (numPoints + 1);
       const x = start.x + (end.x - start.x) * t;
       const y = start.y + (end.y - start.y) * t;
       points.push({ x, y });
     }
     return points;
   }
   const start = { x: 1, y: 1 };  // original data points
   const end = { x: 5, y: 5 };
   const numPoints = 3;    // should depend on line's length for better result
   const result = intermediatePoints(start, end, numPoints);
   console.log(result);
   // Expected output:
   // [{x: 2, y: 2}, {x: 3, y: 3}, {x: 4, y: 4}]
   ```
   Once ready, the points could be added one by one with _setOption_ to create a smooth animation effect.


-- 
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-unsubscribe@echarts.apache.org

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


Re: [I] [Bug] 折线图动态更新时过渡动画失效,并没有从a点缓慢到b点,而是直接跳动 [echarts]

Posted by "echarts-bot[bot] (via GitHub)" <gi...@apache.org>.
echarts-bot[bot] commented on issue #20369:
URL: https://github.com/apache/echarts/issues/20369#issuecomment-2370738095

   @jinMingYang1 It seems you are not using English, I've helped translate the content automatically. To make your issue understood by more people and get helped, we'd like to suggest using English next time. 🤗
   <details><summary><b>TRANSLATED</b></summary><br>
   
   **TITLE**
   
   [Bug] When the line chart is dynamically updated, the transition animation fails. It does not slowly move from point a to point b, but jumps directly.
   </details>


-- 
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-unsubscribe@echarts.apache.org

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


Re: [I] [Bug] 折线图动态更新时过渡动画失效,并没有从a点缓慢到b点,而是直接跳动 [echarts]

Posted by "jinMingYang1 (via GitHub)" <gi...@apache.org>.
jinMingYang1 commented on issue #20369:
URL: https://github.com/apache/echarts/issues/20369#issuecomment-2372800627

   @helgasoft 那有什么办法能够达到这种效果吗?


-- 
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-unsubscribe@echarts.apache.org

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


Re: [I] [Bug] 折线图动态更新时过渡动画失效,并没有从a点缓慢到b点,而是直接跳动 [echarts]

Posted by "helgasoft (via GitHub)" <gi...@apache.org>.
helgasoft commented on issue #20369:
URL: https://github.com/apache/echarts/issues/20369#issuecomment-2372447147

   Line animation does not show **line segments** being drawn, they appear instantly.
   Unlike bars which fill progressively - see [official example](https://echarts.apache.org/examples/en/editor.html?c=dynamic-data).
   I suppose this is by design.


-- 
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-unsubscribe@echarts.apache.org

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


Re: [I] [Bug] 折线图动态更新时过渡动画失效,并没有从a点缓慢到b点,而是直接跳动 [echarts]

Posted by "jinMingYang1 (via GitHub)" <gi...@apache.org>.
jinMingYang1 commented on issue #20369:
URL: https://github.com/apache/echarts/issues/20369#issuecomment-2834630720

   > 是的,我也遇到了这个问题,我想实现类似每秒更新货币的功能,逐步更新太多,而不是直接跳到最新值
   > 
   >  a4f27e29cb2644dae07855369e6f4463.mp4
   
   找到解决方案了吗


-- 
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-unsubscribe@echarts.apache.org

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