现在遇到一个问题,后台返回一条data和一条date数据,date作为横坐标,现在需要将data数据分为两条,后台有返回一个时间分割点,现在数据切分已完成了,生成了两条数据,下面是我的series写法:
series: [{
name: '样本内',
type: 'line',
smooth: true,
itemStyle: {
normal: {
color: 'rgb(164, 215, 220)'
}
},
areaStyle: {
normal: {
color: 'rgb(164, 215, 220)'
}
},
data: data1,
},{
name: '样本外',
type: 'line',
smooth: true,
itemStyle: {
normal: {
color: '#000'
}
},
areaStyle: {
normal: {
color: 'rgb(164, 215, 220)'
}
},
data: data2,
}],
他们共x轴,也就是:xAxis: {
show: true,
type: 'category',
boundaryGap: false,
data: date,
},
问题来了,绘出来的曲线是上图那样的,现在想把他们首位相接,因为这两条曲线来自同一个data而data又是于date相对应的,只是为了区分数据为样本内外,这个怎么实现???大神救命!
之前做过少数据,不知道是不是你要的。参考 https://blog.csdn.net/qq_2564...