我想把-10,-15均线也显示出来,请问这个该怎么弄呢?
option = {
tooltip: {
trigger: 'axis'
},
legend: {
data:['最高气温','最低气温']
},
toolbox: {
show: true,
feature: {
saveAsImage: {}
}
},
xAxis: {
type: 'category',
boundaryGap: false,
data: ['周一','周二','周三','周四','周五','周六','周日']
},
yAxis: {
type: 'value',
axisLabel: {
formatter: '{value}'
}
},
series: [
{
name:'最高气温',
type:'line',
data:[25, 18, 10, 7, 5, 3, 35],
markLine: {
silent: true,
data: [
{name: 'Y 轴值为 100 的水平线',yAxis: 25,label: {
normal: {
formatter: '25'
}
}},
{name: 'Y 轴值为 100 的水平线',yAxis: 20,label: {
normal: {
formatter: '20'
}
}},
{name: 'Y 轴平均水平线',yAxis: 2,label: {
normal: {
formatter: '2'
}
}},
{name: 'Y 轴值为 100 的水平线',yAxis: -10,label: {
normal: {
formatter: '-10'
}
}},
{name: 'Y 轴值为 100 的水平线',yAxis: -15,label: {
normal: {
formatter: '-15'
}
}},
]
}
},
]
};
给y轴设置一个最小值