uniapp-微信小程序-echarts用法。
目前在uni-ec-canvas文件夹内的echarts_all 是所有echarts的js。而echarts.js 只包含了饼图的构建,是为了控制文件的体积大小
若进行js的切换,一定要 命名为echarts.js 。 官网文档地址为: https://gitee.com/sc0314/xcx_echarts#%E4%BD%BF%E7%94%A8
而ec.options的文档请参考echarts的文档。官网地址为: https://echarts.apache.org/examples/zh/index.html
控制版本大小的构建请移步于 https://echarts.apache.org/examples/zh/index.html 步骤为:官网-下载-下载-在线定制
代码:
<template>
<view v-if="ec.option">
<uni-ec-canvas
class="uni-ec-canvas"
id="line-chart"
canvas-id="multi-charts-line"
:ec="ec"
></uni-ec-canvas>
</view>
</template>
<script>
// 目前在uni-ec-canvas文件夹内的echarts_all 是所有echarts的js。而echarts.js 只包含了饼图的构建,是为了控制文件的体积大小
//若进行js的切换,一定要 命名为echarts.js 。 官网文档地址为: https://gitee.com/sc0314/xcx_echarts#%E4%BD%BF%E7%94%A8
//而ec.options的文档请参考echar