antvis/G2

【v5】使用官方文档代码报错 #6127

denghuier posted onGitHub

问题描述

vue3 nodejs:20 npm:8.19.4 过程: 执行官方提供代码,链接如:https://g2.antv.antgroup.com/examples/general/interval/#bar-basic。抛出下面异常: Uncaught TypeError: Failed to execute 'getComputedStyle' on 'Window': parameter 1 is not of type 'Element'. at getContainerSize (@antv_g2.js?v=942620aa:66272:17) at sizeOf2 (@antv_g2.js?v=942620aa:66451:64) at Chart3._createCanvas (@antv_g2.js?v=942620aa:67074:31) at Chart3.render (@antv_g2.js?v=942620aa:66898:12) at Antv.vue:24:7

重现链接

No response

重现步骤

No response

预期行为

No response

平台

  • 操作系统: [macOS, Windows, Linux, React Native ...]
  • 网页浏览器: [Google Chrome, Safari, Firefox]

屏幕截图或视频(可选)

<img width="1061" alt="1710383774435" src="https://github.com/antvis/G2/assets/46817014/3e8fdb10-1aa9-415d-83e3-ee0cbc11ec55">

No response

补充说明(可选)

No response


问题描述

vue3 nodejs:20 npm:8.19.4 过程: 执行官方提供代码,链接如:https://g2.antv.antgroup.com/examples/general/interval/#bar-basic。抛出下面异常: Uncaught TypeError: Failed to execute 'getComputedStyle' on 'Window': parameter 1 is not of type 'Element'. at getContainerSize (@antv_g2.js?v=942620aa:66272:17) at sizeOf2 (@antv_g2.js?v=942620aa:66451:64) at Chart3._createCanvas (@antv_g2.js?v=942620aa:67074:31) at Chart3.render (@antv_g2.js?v=942620aa:66898:12) at Antv.vue:24:7

重现链接

No response

重现步骤

No response

预期行为

No response

平台

  • 操作系统: [macOS, Windows, Linux, React Native ...]
  • 网页浏览器: [Google Chrome, Safari, Firefox]

屏幕截图或视频(可选)

<img alt="1710383774435" width="1061" src="https://private-user-images.githubusercontent.com/46817014/312678971-3e8fdb10-1aa9-415d-83e3-ee0cbc11ec55.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MTAzOTM0OTIsIm5iZiI6MTcxMDM5MzE5MiwicGF0aCI6Ii80NjgxNzAxNC8zMTI2Nzg5NzEtM2U4ZmRiMTAtMWFhOS00MTVkLTgzZTMtZWUwY2JjMTFlYzU1LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDAzMTQlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwMzE0VDA1MTMxMlomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTM3YzAyN2M1NzA4OWZjZTcxNDU3N2M0NTA0NGYwOGNlNmZkOGIwMmY1ZjMwMmM4ZDZmMzk4ZDMxNzAxOGE5ZmMmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.Jl-twXfR6M4nV8vcfVruBJVFz3TUJ9KD-6Q5PjQfaok"> No response

补充说明(可选)

No response

posted by denghuier about 1 year ago

Fund this Issue

$0.00
Funded

Pull requests