You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@echarts.apache.org by "liubin595338764 (via GitHub)" <gi...@apache.org> on 2023/06/11 14:06:26 UTC

[GitHub] [echarts] liubin595338764 opened a new issue, #18749: [Bug] 在动画过程中无法获取endLabel的坐标位置[急,急,急]

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

   ### Version
   
   5.4.2
   
   ### Link to Minimal Reproduction
   
   https://www.pionex.com/static/media/grid_zhtw.b27dae30.gif
   
   ### Steps to Reproduce
   
   null
   
   ### Current Behavior
   
   如图,动画效果我设置了endLabel的圆点,但是动画过程中我无法获取到endLabel的实时位置;
   因为我需要根据endLabel的坐标算出横线的位置;
   
   着急,麻烦指点下;
   
   <img width="1095" alt="image" src="https://github.com/apache/echarts/assets/5274428/b9b66527-78f7-490e-89f4-6464255b9ed0">
   
   
   ### Expected Behavior
   
   期望能在endLabel.formatter中能获取到当前的坐标位置;
   
   或者animation动画的每一帧回调上能获取到endLabel的位置也可以。
   ```js 
   myChart.getZr().animation.on("frame", function (...arg) {
       console.log(arg);
     });
   ```
   
   
   感谢。
   
   ### Environment
   
   ```markdown
   - OS: mac
   - Browser:chrome
   - Framework: vue@3
   ```
   
   
   ### 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


[GitHub] [echarts] minghangben commented on issue #18749: [Bug] 在动画过程中无法获取endLabel的坐标位置[急,急,急]

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

   @liubin595338764 你好,我也有类似需求,请问能够提供一下你gif的这个demo参考一下吗,感谢


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


[GitHub] [echarts] liubin595338764 commented on issue #18749: [Bug] 在动画过程中无法获取endLabel的坐标位置[急,急,急]

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

   @helgasoft 还是有些不一样,他是通过scatter来实现的,也没有获取到动画过程中最后一个数据的坐标


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


[GitHub] [echarts] Ovilia commented on issue #18749: [Bug] 在动画过程中无法获取endLabel的坐标位置[急,急,急]

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

   > @Ovilia请教下有这种例子吗,最好是能在动画过程中获得当前点的坐标数据以及像素位置。需求越来约个性化了
   
   现在应该没有这个能力,如果你愿意贡献 PR 的话,可以尝试在 https://echarts.apache.org/en/option.html#series-line.endLabel.formatter 的参数中返回位置信息


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


[GitHub] [echarts] liubin595338764 commented on issue #18749: [Bug] 在动画过程中无法获取endLabel的坐标位置[急,急,急]

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

   @minghangben 这是一个gif,还没有demo


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


[GitHub] [echarts] helgasoft commented on issue #18749: [Bug] 在动画过程中无法获取endLabel的坐标位置[急,急,急]

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

   similar (and maybe duplicate of) #18742


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


[GitHub] [echarts] echarts-bot[bot] commented on issue #18749: [Bug] 在动画过程中无法获取endLabel的坐标位置[急,急,急]

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

   @liubin595338764 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] The coordinate position of endLabel cannot be obtained during the animation process [urgent, urgent, urgent]
   
   **BODY**
   
   ### Version
   
   5.4.2
   
   ### Link to Minimal Reproduction
   
   https://www.pionex.com/static/media/grid_zhtw.b27dae30.gif
   
   ### Steps to Reproduce
   
   null
   
   ### Current Behavior
   
   As shown in the figure, I set the dot of endLabel in the animation effect, but I can't get the real-time position of endLabel during the animation;
   Because I need to calculate the position of the horizontal line based on the coordinates of endLabel;
   
   Anxious, troublesome pointers;
   
   <img width="1095" alt="image" src="https://github.com/apache/echarts/assets/5274428/b9b66527-78f7-490e-89f4-6464255b9ed0"> 
   ### Expected Behavior
   
   It is expected to get the current coordinate position in endLabel.formatter;
   
   Or the position of endLabel can be obtained on each frame of the animation callback.
   ```js 
   myChart.getZr().animation.on("frame", function (... arg) {
       console.log(arg);
     });
   ```
   
   Thank.
   
   ### Environment
   
   ```markdown
   - OS: mac
   - Browser:chrome
   - Framework: vue@3
   ```
   
   ### Any additional comments?
   
   _No response_
   </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


[GitHub] [echarts] liubin595338764 commented on issue #18749: [Bug] 在动画过程中无法获取endLabel的坐标位置[急,急,急]

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

   @Ovilia请教下有这种例子吗,最好是能在动画过程中获得当前点的坐标数据以及像素位置。需求越来约个性化了


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


[GitHub] [echarts] Ovilia commented on issue #18749: [Bug] 在动画过程中无法获取endLabel的坐标位置[急,急,急]

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

   It's not recommended to do things like `.getZr().animation.on` because this is non-public API and breaks the encapsulation of ECharts. If you wish do make the effect, it's recommended to use a custom series.


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


[GitHub] [echarts] adoin commented on issue #18749: [Bug] 在动画过程中无法获取endLabel的坐标位置[急,急,急]

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

   固定不变的话 Lottie就行,每次数据都变的话 要么能动态算lottie 要么。。。你搜一下lineAnimationDiff 这个方法自己试试魔改一下


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