antvis / G6

♾ A Graph Visualization Framework in JavaScript.
https://g6.antv.antgroup.com/
MIT License
11.05k stars 1.31k forks source link

自定义节点,设置fill为渐变色,定制动画后,fill颜色不生效 #3680

Closed momogugu closed 2 years ago

momogugu commented 2 years ago

问题描述

把render设置为svg 自定义节点no-animation,定义动画为width从0~100,fill设置为 fill: l(0) 0:#f0f0f0 1:#108ee9 背景色仅在第一次渲染时生效,后续数据更新,背景色为白色

重现链接

https://codesandbox.io/s/svg-render-6ypl33

重现步骤

sandbox可复现

预期行为

期望数据更新时,保持渐变色动画

平台

屏幕截图或视频(可选)

No response

补充说明(可选)

No response

Yanyan-Wang commented 2 years ago

更新数据 graph.changeData。看起来没有问题

https://codesandbox.io/s/svg-render-forked-edm5rl