<!--components/record-index/record-index.wxml-->
<view class="chart-container">
  <block wx:if="{{loading}}">
    <view class="loading">加载中...</view>
  </block>
  <block wx:elif="{{error}}">
    <view class="error">加载失败，请重试</view>
  </block>
  <block wx:else>
    <view class="chart">
      <view wx:for="{{charts}}" wx:key="*this" style="width: {{rect.width}}px; height: {{rect.height}}px;">
        <ec-canvas 
          id="dom-{{item.id}}"
          canvas-id="canvas-{{item.id}}"
          ec="{{item}}" 
          force-use-old-canvas="true"
          disable-scroll="true"
        ></ec-canvas>
      </view>
    </view>
  </block>
</view> 