echarts图表markLine的用法与设置多条不同颜色markLine

墨子鱼

一、在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}}]

},

阅读 674
10 声望
1 粉丝
0 条评论
你知道吗?

10 声望
1 粉丝
文章目录
宣传栏