Echarts k线禁止双指缩放效果,只可平移,不可缩放k线图
dataZoom: [{
type: 'slider',
show: false,
//上方时间轴拖动条隐藏
zoomLock: true,
xAxisIndex: [0, 1],
realtime: false,
start: 20,
end: 70,
top: 65,
height: 20,
handleIcon: 'path://M10.7,11.9H9.3c-4.9,0.3-8.8,4.4-8.8,9.4c0,5,3.9,9.1,8.8,9.4h1.3c4.9-0.3,8.8-4.4,8.8-9.4C19.5,16.3,15.6,12.2,10.7,11.9z M13.3,24.4H6.7V23h6.6V24.4z M13.3,19.6H6.7v-1.4h6.6V19.6z',
handleSize: '120%'
},
{
type: 'inside',
zoomLock: true, //禁止双指缩放
xAxisIndex: [0, 1],
start: 40,
end: 70,
top: 30,
height: 20
}],
关键点:在第二段中加入:
zoomLock: true, //禁止双指缩放