1、设置ontouch,如下
<qiun-data-charts
type="tarea"
:ontouch="true"
:opts="opts3"
:chartData="historyData3"
:canvas2d="true"/>
2、开启拖拽功能
enableScroll: true,//开启图表拖拽功能
3、设置数量位置滚动条等参数
xAxis: {
disableGrid: true,
type:'grid',
gridType:'dash',
itemCount:7,//x轴单屏显示数据的数量,默认为5个
scrollShow:false,//新增是否显示滚动条,默认false
scrollAlign:'left',//滚动条初始位置
scrollBackgroundColor:'#F7F7FF',//默认为 #EFEBEF
scrollColor:'#DEE7F7',//默认为 #A6A6A6
},
ok,搞定了