设置了显示两个或多个Y轴,但不能同时缩放,智能缩放最后一个,设置了dataZoom.yAixsIndex = [0,1]也不行...
配置项如下
var option = {
title: {
text: 'ECharts 入门示例'
},
tooltip: {},
toolbox: {
feature: {
dataZoom: {
//yAxisIndex: [0,1]
},
restore: {}
}
},
legend: {
data: ['销量', '销量x']
},
xAxis: {
data: ["衬衫", "羊毛衫", "雪纺衫", "裤子", "高跟鞋", "袜子"]
},
yAxis: [{
type: 'value',
position: 'left'
}, {
type: 'value',
position: 'right'
}],
series: [{
name: '销量',
type: 'line',
data: [5, 1, 5, 1, 5, 10]
}, {
name: '销量x',
type: 'line',
yAxisIndex: 1,
data: [1, 5, 1, 5, 1, 10]
}
]
};