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

TypeError: Cannot create property 'lineStyle' on boolean 'false' #4058

Closed
1 task done
xbzhang2020 opened this issue Aug 1, 2022 · 7 comments
Closed
1 task done

Comments

@xbzhang2020
Copy link

xbzhang2020 commented Aug 1, 2022

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

Reproduction link

https://stackblitz.com/edit/vitejs-vite-qdhzkz?file=main.js,index.html

Steps to reproduce

打开浏览器控制台即可看到报错。

截屏2022-08-01 17 52 48

Environment Info
g2 3.5.19
System OS: macOS 12.4
Browser Chrome: 103.0.5060.134

在Vite中使用@antv/g2,折线图的tooltip无法正常加载,并且浏览器控制台报错。
已经定位到问题:tooltip.crosshairs的初始值为false,会执行g2内部的_mix方法,在严格模式下会抛出错误。
截屏2022-08-01 17 28 46

截屏2022-08-01 17 28 03

希望能尽快解决这一问题。

@hustcc
Copy link
Member

hustcc commented Sep 13, 2022

@xbzhang2020 已经定位到问题了,有兴趣来提交 pr 吗?另外,可以尽快调研迁移到新版本了。

@xbzhang2020
Copy link
Author

好的,我提个PR。

@hustcc hustcc closed this as completed Aug 22, 2023
@wangzhengbo
Copy link

请问这个bug是在哪个版本里面修复的呢?

@wangzhengbo
Copy link

好的,我提个PR。

麻烦问题是哪个PR修复的呀?

@LiMao00
Copy link

LiMao00 commented Dec 1, 2023

好的,我提个PR。

屁事不干,到现在还有这个问题

@AlphaCodeZero
Copy link

这个问题到现在还存在,尝试切换成 canvas 渲染模式,发现 canvas 模式比 html 模式效果差很多。目前没找到办法可以规避

@xbzhang2020
Copy link
Author

xbzhang2020 commented Jan 19, 2024

这个问题不好修复,真正出错的地方应该在g2的一个依赖的@antv/util包中,就搁置了。如果遇到同类问题,可以使用 patch-package 工具给这个包打个补丁,自己就是这么解决的。期待有能力的大佬修复这个问题吧。

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

5 participants