Failed to execute ‘drawImage‘ on ‘CanvasRenderingContext2D‘: The image argument is a canvas element
Echarts重绘报错,原因在于绘制时,未正确获取到画布的宽高,可在容器内写入行内样式,即可解决<template><div class="g2-chart-container" style="height: 300px;"><divv-show="hasData":id="id"class="g2-chart"style="height: 300px; width:
·
Echarts重绘报错,原因在于绘制时,未正确获取到画布的宽高,可在容器内写入行内样式,即可解决
<template>
<div class="g2-chart-container" style="height: 300px;">
<div
v-show="hasData"
:id="id"
class="g2-chart"
style="height: 300px; width: 100%;"
/>
<div v-show="!hasData" class="noData">
暂无数据
</div>
</div>
</template>
更多推荐
已为社区贡献2条内容
所有评论(0)