1、下载GitHub上的 ecomfe/echarts-for-weixin 项目
2、拷贝 ec-canvas 目录到自己的项目中
3、循环生成折线图效果预览
4、代码演示 - 在需要的页面创建折线图
test.json
{
"usingComponents": {
"ec-canvas": "../../lib/ec-canvas/ec-canvas"
}
}
test.wxml
<view class="box" wx:for="{
{ecLine}}" wx:key="index">
<ec-canvas ec="{
{ ecLine[index] }}"></ec-canvas>
</view>
test.wxss
.box {
width:100%;
height:600rpx;
background-color: pink;
}
t