微信小程序echart图表不显示:
- 图表外一层的视图容器设置范围没?
.conta {
position: absolute;
top: 200rpx;
bottom: 0;
left: 0;
right: 0;
display: flex;
flex-direction: column;
align-items: center;
justify-content: space-between;
box-sizing: border-box;
}
- 使用图表的.json文件中引入控件没?
{
"usingComponents": {
"ec-canvas": "../../ec-canvas/ec-canvas"
}
}
- 图表在js文件的data中声明了没?
data:{
ecBar1: {
onInit: initChart1,
},
ecBar2: {
onInit: initChart2
}
}