TypeError: Cannot create property 'lineStyle' on boolean 'false' #4058
xbzhang2020 posted onGitHub
- 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
打开浏览器控制台即可看到报错。
<img width="1738" alt="截屏2022-08-01 17 52 48" src="https://user-images.githubusercontent.com/39360445/182127000-3318ef16-ff5a-4e64-a808-b6e420b14154.png">
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方法,在严格模式下会抛出错误。 <img width="852" alt="截屏2022-08-01 17 28 46" src="https://user-images.githubusercontent.com/39360445/182126715-de27e3ab-3e08-4743-ba1d-18a15279dabe.png">
<img width="1662" alt="截屏2022-08-01 17 28 03" src="https://user-images.githubusercontent.com/39360445/182126875-2d54b79c-c387-4838-9620-f6fb5f535c22.png">
希望能尽快解决这一问题。
<!-- generated by antv-issue-helper. DO NOT REMOVE -->