Can't get DOM width or height. Please check dom.clientWidth
时间: 2023-10-29 18:20:26 浏览: 201
Can't get DOM width or height. Please check dom.clientWidth and dom.clientHeight. They should not be 0. 这个警告是在数据可视化时遇到的一个小问题。根据引和引用,这个警告一般是因为在设置echarts的容器节点宽高时出现了问题。可能是因为宽高没有写在style里,而是写在行内样式中才有效。解决这个问题的方法是将宽高写在style里面。另外,这个问题可能还与调用echarts的时机有关,可能需要在window.onload的回调函数中调用。<span class="em">1</span><span class="em">2</span><span class="em">3</span>
#### 引用[.reference_title]
- *1* *3* [echarts警告:Can‘t get DOM width or height. Please check dom.clientWidth and dom.clientHeight. .......](https://blog.csdn.net/weixin_53443677/article/details/127518215)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_1"}}] [.reference_item style="max-width: 50%"]
- *2* [Can‘t get DOM width or height. Please check dom.clientWidth and dom.clientHeight. They should not ...](https://blog.csdn.net/qq_45547094/article/details/127577313)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_1"}}] [.reference_item style="max-width: 50%"]
[ .reference_list ]
阅读全文