关于不能放大和缩放问题(小程序)
实测是echarts版本的问题,5.4.x,5.3.x都有问题,当我选择用5.1.2版本就可以双指放大缩小了!
只需要在你的option配置添加如下属性:
legend: { // 显示图例组件
show: legendDatta ? true : false,
data: legendDatta,
bottom: '0',
z: 100
},
// 重点,添加这个就可以了
dataZoom: {
type: 'inside'
},
xAxis: {
type: 'category',
boundaryGap: false,
axisLabel: {
showMinLabel: true
},
data: xData,
},
tooltip文字有黑色阴影的设置tooltip.shadowBlur = 0
tooltip: {
show: true,
trigger: 'axis',
shadowBlur: 0, // 去除文字阴影
backgroundColor: 'rgba(0,0,0,0.4)',
textStyle: {
color: '#fff'
},
},