插件下载地址已经api文档
https://github.com/xiaolin3303/wx-charts
要实现滑动页面部分需要绑定这三个事件bindtouchstart="touchstart" bindtouchmove="touchmove" bindtouchend="touchend"
<canvas canvas-id='areacanvas' class='canvas' bindtouchstart="touchstart" bindtouchmove="touchmove" bindtouchend="touchend"></canvas>
第一步引入插件:
var wxCharts = require('../../utils/wxcharts.js');
var mychart;
第二步配置参数以及增加三个绑定事件
canvas:function(){
var that = this;
console.info("****" + that.data.categories + "*******" + that.data.series + "******");
mychart = new wxCharts({
canvasId: 'areacanvas',
type: 'line',
categories: that.data.cat