echarts怎么在固定位置设置线

img


用的echarts,想给10%这里设置一条红线,应该怎么改?(不管数据量的多少)

series里再加一个折线图,把颜色改成红色,数值改为10%

{
            "type": "line",
            showAllSymbol: true,
            symbolSize: 0,
            smooth: true,
            "itemStyle": {
                show:false,
                "normal": {
                    "color": "red",
                    "barBorderRadius": 0,
                    "label": {
                        "show": false,
                    }
                }
            },
            tooltip: {
                show: false
            },
            "data": [
                10,
                10,
                10,
                10,
                10,
                10
            ]
        },

https://echarts.apache.org/examples/zh/editor.html?c=line-aqi

markline设置一下

img

你想去掉箭头,虚线改实线看一下文档就行了 样式也可以自己设置

img

https://echarts.apache.org/zh/option.html#series-line.markLine