echarts markline 不同颜色

option = {
xAxis: {
type: 'category',
data: [1,2,3,4,5,6,7]
},
yAxis: {
type: 'value'
},
series: [{
data: [820, 932, 901, 934, 1290, 1330, 1320],
type: 'line',
markLine: {
symbol:'none',
data: [
[
{

itemStyle:{
normal:{
show:true,
color:'green'
}
},
lineStyle: {
normal: {
type: 'solid',
color: 'green'
}
},
coord:[0, 820]
},
{
coord:[3, 934]
}
],
[
{
itemStyle:{
normal:{
show:true,
color:'red'
}
},
lineStyle: {
normal: {
type: 'solid',
color: 'red'
}
},
coord:[3, 934]
},
{

coord:[6, 1320]
}
],
]
},

}
]
};

 

 

posted on 2018-11-09 14:50  忆小样  阅读(8493)  评论(0编辑  收藏  举报