echarts的markline层级问题

图片.png

可以看的红色的markline遮住了灰色的圆形,如何设置使得markline从灰色圆形下面穿过?代码如下,贴到echarts上就可以看的。

option = {
  singleAxis: {
    type: 'category',
    boundaryGap: false,
    data: [
      '12a',
      '1a',
      '2a',
      '3a',
      '4a',
      '5a',
      '6a',
      '7a',
      '8a',
      '9a',
      '10a',
      '11a',
      '12p',
    ],
    top: '5%',
    height: '4.2857142857142865%'
  },
  series: [
    {
      singleAxisIndex: 0,
      coordinateSystem: 'singleAxis',
      type: 'scatter',
      data: [
        [3, 3],
        [5, 4],
        [10, 2]
      ],
      itemStyle: {
        color: 'gray'
      },
      markLine: {
        symbol: 'none', // 去掉箭头

        lineStyle: {
          color: 'red'
        },
        data: [[{ coord: [0] }, { coord: [12] }]]
      }
    }
  ]
};
阅读 5.2k
撰写回答
你尚未登录,登录后可以
  • 和开发者交流问题的细节
  • 关注并接收问题和回答的更新提醒
  • 参与内容的编辑和改进,让解决方法与时俱进
推荐问题