xgqfrms / uni-app-in-action

uni-app 实战
MIT License
0 stars 0 forks source link

ucharts 获取点击数据 All In One #14

Open xgqfrms opened 3 years ago

xgqfrms commented 3 years ago

ucharts 获取点击数据 All In One

https://www.cnblogs.com/xgqfrms/p/14969215.html

xgqfrms commented 3 years ago
    <qiun-title-bar title="基本曲线图(自定义图表类型)"/>
    <view class="charts-box">
      <!-- 这里的type="demotype"演示了自定义图表类型的demo,您可以根据需求自己定义一种额外的图表类型 -->
      <qiun-data-charts type="demotype" :opts="{xAxis:{boundaryGap:'justify'}}" :chartData="chartsDataLine2"/>
      <!-- 如果不定义"demotype"这个图表类型,可以通过传递opts来覆盖line下的默认配置,如下 -->
      <!-- <qiun-data-charts type="line" :opts="{extra:{line:{type:'curve'}}}" :chartData="chartsData.Line2"/> -->
    </view>
    <qiun-title-bar title="基本曲线图(line & type:'curve')"/>
    <view class="charts-box">
      <!-- 如果不定义"demotype"这个图表类型,可以通过传递opts来覆盖line下的默认配置,如下 -->
      <!-- <qiun-data-charts type="line" :opts="{extra:{line:{type:'curve'}}}" :chartData="chartsData.Line2"/> -->
      <qiun-data-charts type="line" :opts="{extra:{line:{type:'curve'}}}" :chartData="chartsDataLine2"/>
    </view>