@@ -229,6 +229,9 @@ Page({
this.setData({
day: '7'
})
+ this.echartsComponnet = this.selectComponent('#mychart')
+ this.initChart()
+ this.getweekday()
}
},
//获取目标步数
@@ -120,7 +120,7 @@
</view>
<view class="card3-bottom">
- <ec-canvas id="mychart" canvas-id="mychart" ec="{{ec}}"></ec-canvas>
+ <ec-canvas wx:if="{{day=='7'}}" id="mychart" canvas-id="mychart" ec="{{ec}}"></ec-canvas>