1. 画线
const markLineOptFactory = (start = [0.3, 0], end = [0.3, 1]) => {
return {
animation: true,
label: {
show: false,
},
lineStyle: {
type: 'dashed',
color: '#fe8f8f'
},
tooltip: {
show: false
},
data: [
[
{
coord: start,
symbol: 'none'
},
{
coord: end,
symbol: 'none'
}
]
]
}
}
// 创建 `series` 数据
const lineArray = [
{
type: 'scatter',
markLine: markLineOptFactory()
},
]
标签:const,show,0.3,备忘,false,echarts
From: https://www.cnblogs.com/whm-blog/p/16597930.html