控制台警告
lt1067066026 opened this issue · 4 comments
lt1067066026 commented
请确认
- 我可以确认这个问题无法在 ECharts 项目本身中复现。
您是如何将 Vue-ECharts 引入项目的?
通过 ES 模块 import
版本信息
├── echarts@5.4.3
├── vue@3.3.10
└── vue-echarts@6.6.2
问题详情
[ECharts] Can't get DOM width or height. Please check dom.clientWidth and dom.clientHeight. They should not be 0.For example, you may need to call this in the callback of window.onload.
问题复现
https://stackblitz.com/edit/vue-echarts-vue-3?file=src%2FApp.vue
Shyam-Chen commented
Downgrade to v6.6.1.
funny-cat-happy commented
it seems to be a upstream error apache/echarts#10478. And it hasn't been fixed yet. You can add init-options to it.
<v-chart class="chart" :option="heartOption" :init-options="initOption" />
const initOption = {
width: 'auto',
height: 300
}
Justineo commented
It is a regression introduced by v6.6.2 and now fixed in v6.6.3.
BenJackGill commented
it seems to be a upstream error apache/echarts#10478. And it hasn't been fixed yet. You can add init-options to it.
<v-chart class="chart" :option="heartOption" :init-options="initOption" /> const initOption = { width: 'auto', height: 300 }
This issues seems to be back again, but the init-options
work around is working.