左右Y轴刻度不对其,如果使右边10°c的刻度与左边50ml的刻度在同一个高度
配置项如下
app.title = '折柱混合';
option = {
tooltip: {
trigger: 'axis',
axisPointer: {
type: 'cross',
crossStyle: {
color: '#999'
}
}
},
toolbox: {
feature: {
dataView: {
show: true,
readOnly: false
},
magicType: {
show: true,
type: ['line', 'bar']
},
restore: {
show: true
},
saveAsImage: {
show: true
}
}
},
legend: {
data: ['蒸发量', '平均温度']
},
xAxis: [{
type: 'category',
data: ['1月', '2月', '3月', '4月', '5月', '6月'],
axisPointer: {
type: 'shadow'
}
}],
yAxis: [{
type: 'value',
name: '水量',
axisLabel: {
formatter: '{value} ml'
}
},
{
type: 'value',
name: '温度',
axisLabel: {
formatter: '{value} °C'
}
}
],
series: [{
name: '蒸发量',
type: 'bar',
data: [132.0, 24.9, 7.0, 23.2, 0, 0]
},
{
name: '平均温度',
type: 'line',
yAxisIndex: 1,
data: ['', '', '', '', 26.3, 10.2]
}
]
};