Skip to content

Commit ae4583a

Browse files
author
xiabingwu
committed
优化案例line体验
1 parent c2a60d7 commit ae4583a

File tree

3 files changed

+3
-1
lines changed

3 files changed

+3
-1
lines changed

dev/page/canvas/chartWrap.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ export default function(config){
3131
switch(eventName){
3232
case 'touchstart':
3333
pageThis[canvasId+'TouchStart']=method
34+
pageThis[canvasId+'TouchMove']=method
3435
pageThis[canvasId+'TouchEnd']=function(){}
3536
break;
3637
}

dev/page/line/getConfig.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ export default function(canvasConfig,labels,data){
3333
},
3434
tooltips: {
3535
displayColors:false,//不显示小方框
36+
mode:'x',
3637
callbacks: {
3738
title:function(tooltipItem){
3839
//return tooltipItem[0].xLabel+':'+tooltipItem[0].yLabel;

dev/page/line/index.wxml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
<view class="chart-iframe">
2-
<canvas disable-scroll="true" style="width:{{myCanvasStyle.width}}px; height: {{myCanvasStyle.height}}px;" bindtouchstart="myCanvasTouchStart" bindtouchend="myCanvasTouchEnd" canvas-id="myCanvas"></canvas>
2+
<canvas disable-scroll="true" style="width:{{myCanvasStyle.width}}px; height: {{myCanvasStyle.height}}px;" bindtouchstart="myCanvasTouchStart" bindtouchmove="myCanvasTouchMove" bindtouchend="myCanvasTouchEnd" canvas-id="myCanvas"></canvas>
33
</view>

0 commit comments

Comments
 (0)