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()
  },
]

posted @ 2022-08-18 10:48  whmmm  阅读(55)  评论(0)    收藏  举报
//增加一段JS脚本,为目录生成使用