-
在iview的Modal中写入echarts时,无论采用rem还是px,或者采用组件引用echarts——
<v-chart :options="optionModel" :auto-resize="true" />
均不能改变echarts的大小,出现情况如下图:
-
解决方法。
#myChart {
width: 100%;
height: 100%;
.echarts {
width: 22.75rem /* 910px */;
height: 6rem /* 240px */;
}
}