其他分享
首页 > 其他分享> > echarts 备忘

echarts 备忘

作者:互联网

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,markLineOptFactory,0.3,备忘,start,false,echarts
来源: https://www.cnblogs.com/whm-blog/p/16597930.html