1

一、在series下,新增markLine:
markLine: {

symbol: 'none',
label:{
    // position:[10, 10],
    color:'#FF1D00',
    fontSize:12,
    formatter:"危险(40dB)"
},
lineStyle:{
    type:'solid',
    color: '#FF1D00',
    width: 1
},
data: [
    {xAxis: '40', name:'危险(40dB)'},
]

},

二、多条不同颜色markLine
markLine: {

symbol: 'none',
label:{
    color:'#FF1D00',
    fontSize:12,
    formatter:"危险(40dB)"
},
lineStyle:{
    type:'solid',
    color: '#FF1D00',
    width: 1
},
data: [
{yAxis: '40',lineStyle: {color: '#FF1D00'},label: {color: '#FF1D00',formatter:'危险(40dB)',fontSize:10}},
{yAxis: '25',lineStyle: {color: '#FF7804'},label: {color: '#FF7804',formatter:'异常(25dB)',fontSize:10}}]

},


墨子鱼
16 声望1 粉丝