antvis/G2

chart.scale()里面的参数max为NaN的时候导致浏览器崩溃 #3413

Break-2020 posted onGitHub

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

https://g2.antv.vision/zh/examples/bar/basic#basic

Steps to reproduce

chart.scale('population', { nice: true , max:NaN}); 只要max是NaN,就会引发崩溃,这种情况应该只让这个图表绘制不出报错什么的就可以了吧。

image

image

Environment Info
g2 4.1.16
System 90.0.4430.93(正式版本) (64 位)
Browser Chrome

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


应该是死循环造成的,需要对参数进行一下检查。

posted by pearmini almost 4 years ago

这个 bug 在新版的 scale 已经修复。

posted by yuzhanglong almost 4 years ago
posted by yuzhanglong almost 4 years ago

antvis/scale#117

哦哦,那现在4.1.16上也修复了吗

posted by Break-2020 almost 4 years ago

antvis/scale#117

哦哦,那现在4.1.16上也修复了吗

暂时没有,等下我会处理~

posted by yuzhanglong almost 4 years ago

antvis/scale#117

哦哦,那现在4.1.16上也修复了吗

暂时没有,等下我会处理~

好的,麻烦了

posted by Break-2020 almost 4 years ago

已修复,最新 scale 版本 0.3.10。直接本地重新安装依赖,保证底层 scale 版本是 0.3.10 即可。

posted by yuzhanglong almost 4 years ago

已修复,最新 scale 版本 0.3.10。直接本地重新安装依赖,保证底层 scale 版本是 0.3.10 即可。

好的

posted by Break-2020 almost 4 years ago

Fund this Issue

$0.00
Funded

Pull requests