uni-app使用eachrts组件绘制柱状图
html
<!-- 柱状图 -->
<view class="qiun-charts" v-show="!show && typeID == 1">
<canvas canvas-id="canvasColumn" id="canvasColumn" class="charts" @touchstart="touchColumn"></canvas>
</view>
import uCharts from '../../js_sdk/u-charts/u-charts/u-charts.js';//这里是你的u-charts组件路径
var _self;
var canvaColumn = null;
export default {
data() {
return {
cWidth: '',
cHeight: '',
pixelRatio: 1,
serverData: ''
}
}