antvis/G2

BUG: 数据存在 null 且设置 lineCap: 'round' 以及渐变色 的时候报错 #3109

visiky posted onGitHub

  • I have searched the issues of this repository and believe that this is not a duplicate.

https://riddle.alibaba-inc.com/riddles/b04478ba

Steps to reproduce

https://riddle.alibaba-inc.com/riddles/b04478ba

  • 三个条件:数据存在 null,设置 style: { lineCap: 'round' } 且填充色为渐变色
  • 报错信息: Failed to execute 'createLinearGradient' on 'CanvasRenderingContext2D': The provided double value is non-finite.
Environment Info
g2 4.1.2
System -
Browser -

<!-- generated by antv-issue-helper. DO NOT REMOVE -->


image

G 中之前对 path 做了 NaN 处理,但是做的不全,还需要处理 Infinity,见 PR:https://github.com/antvis/g/pull/807

posted by hustcc over 3 years ago

Fund this Issue

$0.00
Funded

Pull requests