如图:

用canvas画图以及wxcharts.js

wxcharts.js我修改了一些东西

参考wxcharts文档修改

wxml:

canvascanvas-id="Statistical"/canvas

js:

constCharts=require('../../dist/wxcharts.js')Page({data:{},onLoad:function(options){newCharts({canvasId:'Statistical',type:'area',categories:['1月','2月','3月','4月','5月','6月'],series:[{name:'成交量1',color:'#BDE1F3',//配色,不传入则使用系统默认配色方案background:'#1F9CEC',data:[6.4,6.5,6.9,6.8,6.8,6.7],format:function(val){console.log('统计图',val)returnval.toFixed(2);}}],yAxis:{min:0,//Y轴起始值disableGrid:true},extra:{lineStyle:'curve'//(仅对line,area图表有效)可选值:curve曲线,straight直线(默认)},dataPointShape:true,width:320,height:175});}})

TAG标签: 微信小程序画统计图小程序统计图插件微信小程序统计图

http://www.xiaochengxub.com/read-96998.html