Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

【v5】径向图中的 point shape 不支持 waveIn 动画 #6233

Open
HuColin opened this issue May 20, 2024 · 0 comments
Open

【v5】径向图中的 point shape 不支持 waveIn 动画 #6233

HuColin opened this issue May 20, 2024 · 0 comments

Comments

@HuColin
Copy link

HuColin commented May 20, 2024

问题描述

@antv/g2 v5 版本中在 radiual 坐标系下 point shape 不支持 waveIn 动画
报错提示

undefined is not iterable (cannot read property Symbol(Symbol.iterator))

重现链接

https://codesandbox.io/p/sandbox/tender-hofstadter-w5w6zj

重现步骤

问题发现

在配置仪表盘中的 indicator 部分 waveIn 动画时发现配置不生效,期望的效果是仪表盘指针从 0% 旋转至指定位置
尝试过参考 gauge 的源码,在 radial 坐标下通过自定义 indicator 的 shape(point)尝试实现动画效果,发现仍然报错

TypeError: undefined is not iterable (cannot read property Symbol(Symbol.iterator))
    at sub (vector.js:1:1)
    at getArcObject (utils.js:121:1)
    at waveIn.js:31:1
    at plot.js:1010:1
    at plot.js:666:1

对异常处断点,对比 interval 和 point 在 animation/waveIn 动画下的参数,发现 shape.__data__y1 属性缺失导致报错

进一步地发现

直接在 径向图 Demo 中配置动画也是会报错的 Demo

参考内容

参考 mark.label 支持动画折线图动画 可知 point 动画在 直角坐标系下是没有问题的

预期行为

我期望看到 Point 类的 Shape 在 radial 坐标系下也可以有 waveIn 的动画效果
我实际看到的 会报错/动画不生效/极端情况下 point 类的 shape 无法渲染

平台

  • 操作系统: [macOS]
  • 网页浏览器: [Google Chrome]

屏幕截图或视频(可选)

No response

补充说明(可选)

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant