option = {
xAxis: {
type: 'category',
data: ['1点', '2点', '3点', '4点', '5点', '6点', '7点', '8点', '9点', '10点', '11点']
},
yAxis: {
type: 'value'
},
series: [{
data: [0, -5, -7, 4, 3, 2, 1, 3, -3, 1],
type: 'line',
label: {
normal: {
show: true,
}},
markLine : {
data : [
// 纵轴,默认
{name: '', yAxis: 1, lineStyle: {color: 'red'}},
{name: '', yAxis: -3, lineStyle: {color: 'red'}},
]
}
}]
};