一效果图
二 代码
markLine中是数组格式 lineStyle可以修改连线的颜色
{
type: 'scatter',
symbolSize: 6,
label: {
show: true,
position: 'insideTop',
fontSize: 14,
lineHeight: 16,
fontWeight: 700,
},
markLine: {
silent: true, // 鼠标悬停事件, true悬停不会出现实线
symbol: 'none', // 去掉箭头
data: [
[
{
coord: [-12, -9],
lineStyle: {
width: 1,
type: 'solid',
color: '#3E3E3E',
},
},
{
coord: [-12, 2],
lineStyle: {
width: 1,
type: 'solid',
color: '#3E3E3E',
},
}
],
[
{
coord: [-12, -9],
lineStyle: {
width: 1,
type: 'solid',
color: '#3E3E3E',
},
},
{
coord: [-4, -2],
lineStyle: {
width: 1,
type: 'solid',
color: '#3E3E3E',
},
}
]
]
},
data: dt.data,
},