为什么echarts多个点在同一竖直线上tooltip只显示最上面那个点的提示框

先来看看问题长什么样子?

我鼠标在OP60,显示的却是最上面的那个SPC1的提示框;

上配置项代码:

optionchartditu = {
    title: {
        text: '变化点laylout图',
        textStyle: {
            color: 'white',
            fontSize: 20,
        },
        x: 'center',
        top: 10,
    },
    //不设置背景颜色就是透明色
    //backgroundColor: '#000',
    xAxis: {
        show: false,
        min: 0,
        max: 1200,
        type: "value",
        //开启x轴坐标
       axisPointer: {
                        	type: 'none'
                        },
    },

    yAxis: {
        show: false,
        min: 0,
        max: 1200,
          type: "value",
        //开启y轴坐标
        axisPointer: {
                        	type: 'none'
                        },
    },

    tooltip: {
        show:true,
        trigger:'axis',
        formatter(params) {
        const item = params[0];
        return `
                变化点地址:${item['data'].name}</br>
                变化点内容:${item['data'].bianhua}
               `;
 },},
    //  legend: {
    //     show: false
    //  },
    series: [
        {
            type: 'graph',
            zlevel: 5,
            draggable: false,
            coordinateSystem: 'cartesian2d', //使用二维的直角坐标系(也称笛卡尔坐标系)

            // edgeSymbolSize: [0, 8], //边两端的标记大小,可以是一个数组分别指定两端,也可以是单个统一指定
            // edgeLabel: {
            //   normal: {
            //     textStyle: {
            //       fontSize: 60
            //     }
            //   }
            // },
            symbol: 'rect',
            symbolOffset: ['15%', 0],

            label: {
                normal: {
                    show: true,
                },
            },
            data: datawe,
}
}

 

是否方便把数据发一下呢?我这边调试看一下。

var chartDomditu = document.getElementById('chartditu');
var myChartchartditu = echarts.init(chartDomditu,'dark');
var optionchartditu;
var datawe = [
    {
        name: '缸盖模块三',
        symbolSize: 0.1,
        value: [5, 1000],
        x: 800,
        y: 400,
        fixed: true,
        // draggable: false,
        category: 1,
        label: {
            color: '#35c2ff',
            position: 'bottom',
            fontSize: 24,
            fontWeight: 1000,
        },
        itemStyle: {
            normal: {
                color: new echarts.graphic.LinearGradient(0, 0, 1, 0, [
                    {
                        offset: 0,
                        color: '#157eff',
                    },
                    {
                        offset: 1,
                        color: '#35c2ff',
                    },
                ]),
            },
        },
    },
    {
        name: 'OP05',
        symbol: 'circle',
        symbolSize: [25, 25],
        value: [5, 600],
        x: 800,
        y: 400,
        fixed: true,
        // draggable: false,
        category: 1,
        label: {
            color: '#FFF',
            position: 'bottom',
        },
        itemStyle: {
            normal: {
                color: new echarts.graphic.LinearGradient(0, 0, 1, 0, [
                    {
                        offset: 0,
                        color: '#FF1493',
                    },
                    {
                        offset: 1,
                        color: '#0000FF',
                    },
                ]),
            },
        },
    },
    {
        name: 'OP10A',
        x: 400,
        y: 400,
        value: [100, 750],
        fixed: true,
        symbol: 'circle',
        symbolSize: [15, 15],
        label: {
            color: '#FFF',
            position: 'top',
        },
        category: 1,
        itemStyle: {
            normal: {
                color: new echarts.graphic.LinearGradient(0, 0, 1, 0, [
                    {
                        offset: 0,
                        color: '#157eff',
                    },
                    {
                        offset: 1,
                        color: '#35c2ff',
                    },
                ]),
            },
        },
    },
    {
    name: 'OP10B',
    x: 400,
    y: 400,
    value: [100, 450],
    fixed: true,
    symbol: 'circle',
    symbolSize: [15, 15],
    label: {
        color: '#FFF',
        position: 'bottom',
    },
    category: 1,
    itemStyle: {
        normal: {
            color: new echarts.graphic.LinearGradient(0, 0, 1, 0, [
                {
                    offset: 0,
                    color: '#157eff',
                },
                {
                    offset: 1,
                    color: '#35c2ff',
                },
            ]),
        },
    },
},
    {
        name: 'OP20A',
        x: 1000,
        y: 1000,
        value: [200, 750],
        fixed: true,
        symbol: 'circle',
        symbolSize: [15, 15],
        label: {
            color: '#fff',
            position: 'bottom',
        },
        category: 1,
        itemStyle: {
            normal: {
                color: new echarts.graphic.LinearGradient(0, 0, 1, 0, [
                    {
                        offset: 0,
                        color: '#157eff',
                    },
                    {
                        offset: 1,
                        color: '#35c2ff',
                    },
                ]),
            },
        },
    },
    {
        name: 'OP20B',
        symbol: 'circle',
        symbolSize: [15, 15],
        label: {
            color: '#efefef',
            position: 'top',
        },
        value: [200, 450],
        x: 1000,
        y: 1000,
        fixed: true,
        category: 2,
        itemStyle: {
            normal: {
                color: new echarts.graphic.LinearGradient(0, 0, 1, 0, [
                    {
                        offset: 0,
                        color: '#157eff',
                    },
                    {
                        offset: 1,
                        color: '#35c2ff',
                    },
                ]),
            },
        },
    },
    {
        name: 'OP30A',
        symbol: 'circle',
        symbolSize: [15, 15],
        label: {
            color: '#efefef',
            position: 'top',
        },
        value: [300, 750],
        x: 1000,
        y: 1000,
        fixed: true,
        category: 2,
        itemStyle: {
            normal: {
                color: new echarts.graphic.LinearGradient(0, 0, 1, 0, [
                    {
                        offset: 0,
                        color: '#157eff',
                    },
                    {
                        offset: 1,
                        color: '#35c2ff',
                    },
                ]),
            },
        },
    },
    {
        name: 'OP30B',
        symbol: 'circle',
        symbolSize: [15, 15],
        label: {
            color: '#efefef',
            position: 'bottom',
        },
        value: [300, 450],
        x: 1000,
        y: 1000,
        fixed: true,
        category: 2,
        itemStyle: {
            normal: {
                color: new echarts.graphic.LinearGradient(0, 0, 1, 0, [
                    {
                        offset: 0,
                        color: '#157eff',
                    },
                    {
                        offset: 1,
                        color: '#35c2ff',
                    },
                ]),
            },
        },
    },
    {
        name: 'OP40A',
        symbol: 'circle',
        symbolSize: [15, 15],
        label: {
            color: '#efefef',
            position: 'bottom',
        },
        value: [400, 750],
        x: 1000,
        y: 1000,
        fixed: true,
        category: 2,
        itemStyle: {
            normal: {
                color: new echarts.graphic.LinearGradient(0, 0, 1, 0, [
                    {
                        offset: 0,
                        color: '#157eff',
                    },
                    {
                        offset: 1,
                        color: '#35c2ff',
                    },
                ]),
            },
        },
    },
    {
        name: 'OP40B',
        symbol: 'circle',
        symbolSize: [15, 15],
        label: {
            color: '#efefef',
            position: 'top',
        },
        value: [400, 450],
        x: 1000,
        y: 1000,
        fixed: true,
        category: 2,
        itemStyle: {
            normal: {
                color: new echarts.graphic.LinearGradient(0, 0, 1, 0, [
                    {
                        offset: 0,
                        color: '#157eff',
                    },
                    {
                        offset: 1,
                        color: '#35c2ff',
                    },
                ]),
            },
        },
    },
    {
        name: 'OP50A',
        symbol: 'circle',
        symbolSize: [15, 15],
        label: {
            color: '#efefef',
            position: 'top',
        },
        value: [500, 750],
        x: 1000,
        y: 1000,
        fixed: true,
        category: 2,
        itemStyle: {
            normal: {
                color: new echarts.graphic.LinearGradient(0, 0, 1, 0, [
                    {
                        offset: 0,
                        color: '#157eff',
                    },
                    {
                        offset: 1,
                        color: '#35c2ff',
                    },
                ]),
            },
        },
    },
    {
        name: 'OP50B',
        symbol: 'circle',
        symbolSize: [15, 15],
        label: {
            color: '#efefef',
            position: 'bottom',
        },
        value: [500, 450],
        x: 1000,
        y: 1000,
        fixed: true,
        category: 2,
        itemStyle: {
            normal: {
                color: new echarts.graphic.LinearGradient(0, 0, 1, 0, [
                    {
                        offset: 0,
                        color: '#157eff',
                    },
                    {
                        offset: 1,
                        color: '#35c2ff',
                    },
                ]),
            },
        },
    },
    {
        name: 'SPC1',
        symbol: 'circle',
        symbolSize: [25, 25],
        label: {
            color: '#efefef',
            position: 'top',
        },
        value: [600, 900],
        x: 1000,
        y: 1000,
        fixed: true,
        category: 2,
        itemStyle: {
            normal: {
                color: new echarts.graphic.LinearGradient(0, 0, 1, 0, [
                    {
                        offset: 0,
                        color: '#FF1493',
                    },
                    {
                        offset: 1,
                        color: '#0000FF',
                    },
                ]),
            },
        },
    },
    {
        name: 'OP60',
        symbol: 'circle',
        symbolSize: [25, 25],
        label: {
            color: '#efefef',
            position: 'top',
        },
        value: [600, 600],
        x: 1000,
        y: 1000,
        fixed: true,
        category: 2,
        itemStyle: {
            normal: {
                color: new echarts.graphic.LinearGradient(0, 0, 1, 0, [
                    {
                        offset: 0,
                        color: '#FF1493',
                    },
                    {
                        offset: 1,
                        color: '#0000FF',
                    },
                ]),
            },
        },
    },
    {
        name: 'OP70',
        symbol: 'circle',
        symbolSize: [25, 25],
        label: {
            color: '#efefef',
            position: 'top',
        },
        value: [700, 750],
        x: 1000,
        y: 1000,
        fixed: true,
        category: 2,
        itemStyle: {
            normal: {
                color: new echarts.graphic.LinearGradient(0, 0, 1, 0, [
                    {
                        offset: 0,
                        color: '#FF1493',
                    },
                    {
                        offset: 1,
                        color: '#0000FF',
                    },
                ]),
            },
        },
    },
    {
        name: 'OP80',
        symbol: 'circle',
        symbolSize: [25, 25],
        label: {
            color: '#efefef',
            position: 'top',
        },
        value: [950, 750],
        x: 1000,
        y: 1000,
        fixed: true,
        category: 2,
        itemStyle: {
            normal: {
                color: new echarts.graphic.LinearGradient(0, 1, 1, 0, [
                    {
                        offset: 0,
                        color: '#FF1493',
                    },
                    {
                        offset: 1,
                        color: '#0000FF',
                    },
                ]),
            },
        },
    },
    {
        name: 'OP90B',
        symbol: 'circle',
        symbolSize: [15, 15],
        label: {
            color: '#efefef',
            position: 'left',
        },
        value: [900, 650],
        x: 1000,
        y: 1000,
        fixed: true,
        category: 2,
        itemStyle: {
            normal: {
                color: new echarts.graphic.LinearGradient(0, 0, 1, 0, [
                    {
                        offset: 0,
                        color: '#157eff',
                    },
                    {
                        offset: 1,
                        color: '#35c2ff',
                    },
                ]),
            },
        },
    },
    {
        name: 'OP90A',
        symbol: 'circle',
        symbolSize: [15, 15],
        label: {
            color: '#efefef',
            position: 'right',
        },
        value: [1000, 650],
        x: 1000,
        y: 1000,
        fixed: true,
        category: 2,
        itemStyle: {
            normal: {
                color: new echarts.graphic.LinearGradient(0, 0, 1, 0, [
                    {
                        offset: 0,
                        color: '#157eff',
                    },
                    {
                        offset: 1,
                        color: '#35c2ff',
                    },
                ]),
            },
        },
    },
    {
        name: 'OP100B',
        symbol: 'circle',
        symbolSize: [15, 15],
        label: {
            color: '#efefef',
            position: 'left',
        },
        value: [900, 550],
        x: 1000,
        y: 1000,
        fixed: true,
        category: 2,
        itemStyle: {
            normal: {
                color: new echarts.graphic.LinearGradient(0, 0, 1, 0, [
                    {
                        offset: 0,
                        color: '#157eff',
                    },
                    {
                        offset: 1,
                        color: '#35c2ff',
                    },
                ]),
            },
        },
    },
    {
        name: 'OP100A',
        symbol: 'circle',
        symbolSize: [15, 15],
        label: {
            color: '#efefef',
            position: 'right',
        },
        value: [1000, 550 ],
        x: 1000,
        y: 1000,
        fixed: true,
        category: 2,
        itemStyle: {
            normal: {
                color: new echarts.graphic.LinearGradient(0, 1, 1, 0, [
                    {
                        offset: 0,
                        color: '#157eff',
                    },
                    {
                        offset: 1,
                        color: '#35c2ff',
                    },
                ]),
            },
        },
    },
    {
        name: 'OP110B',
        symbol: 'circle',
        symbolSize: [15, 15],
        label: {
            color: '#efefef',
            position: 'left',
        },
        value: [900, 450],
        x: 1000,
        y: 1000,
        fixed: true,
        category: 2,
        itemStyle: {
            normal: {
                color: new echarts.graphic.LinearGradient(0, 0, 1, 0, [
                    {
                        offset: 0,
                        color: '#157eff',
                    },
                    {
                        offset: 1,
                        color: '#35c2ff',
                    },
                ]),
            },
        },
    },
    {
        name: 'OP110A',
        symbol: 'circle',
        symbolSize: [15, 15],
        label: {
            color: '#efefef',
            position: 'right',
        },
        value: [1000, 450],
        x: 1000,
        y: 1000,
        fixed: true,
        category: 2,
        itemStyle: {
            normal: {
                color: new echarts.graphic.LinearGradient(0, 0, 1, 0, [
                    {
                        offset: 0,
                        color: '#157eff',
                    },
                    {
                        offset: 1,
                        color: '#35c2ff',
                    },
                ]),
            },
        },
    },
    {
        name: 'OP120B',
        symbol: 'circle',
        symbolSize: [15, 15],
        label: {
            color: '#efefef',
            position: 'left',
        },
        value: [900, 350],
        x: 1000,
        y: 1000,
        fixed: true,
        category: 2,
        itemStyle: {
            normal: {
                color: new echarts.graphic.LinearGradient(0, 0, 1, 0, [
                    {
                        offset: 0,
                        color: '#157eff',
                    },
                    {
                        offset: 1,
                        color: '#35c2ff',
                    },
                ]),
            },
        },
    },
    {
        name: 'OP120A',
        symbol: 'circle',
        symbolSize: [15, 15],
        label: {
            color: '#efefef',
            position: 'right',
        },
        value: [1000, 350],
        x: 1000,
        y: 1000,
        fixed: true,
        category: 2,
        itemStyle: {
            normal: {
                color: new echarts.graphic.LinearGradient(0, 0, 1, 0, [
                    {
                        offset: 0,
                        color: '#157eff',
                    },
                    {
                        offset: 1,
                        color: '#35c2ff',
                    },
                ]),
            },
        },
    },
    {
        name: 'OP130B',
        symbol: 'circle',
        symbolSize: [15, 15],
        label: {
            color: '#efefef',
            position: 'left',
        },
        value: [900, 250],
        x: 1000,
        y: 1000,
        fixed: true,
        category: 2,
        itemStyle: {
            normal: {
                color: new echarts.graphic.LinearGradient(0, 0, 1, 0, [
                    {
                        offset: 0,
                        color: '#157eff',
                    },
                    {
                        offset: 1,
                        color: '#35c2ff',
                    },
                ]),
            },
        },
    },
    {
        name: 'OP130A',
        symbol: 'circle',
        symbolSize: [15, 15],
        label: {
            color: '#efefef',
            position: 'right',
        },
        value: [1000, 250],
        x: 1000,
        y: 1000,
        fixed: true,
        category: 2,
        itemStyle: {
            normal: {
                color: new echarts.graphic.LinearGradient(0, 0, 1, 0, [
                    {
                        offset: 0,
                        color: '#157eff',
                    },
                    {
                        offset: 1,
                        color: '#35c2ff',
                    },
                ]),
            },
        },
    },
    {
        name: 'SCP2',
        symbol: 'circle',
        symbolSize: [20, 20],
        label: {
            color: '#efefef',
            position: 'left',
        },
        value: [1150,135],
        x: 1000,
        y: 1000,
        fixed: true,
        category: 2,
        itemStyle: {
            normal: {
                color: new echarts.graphic.LinearGradient(0, 1, 1, 0, [
                    {
                        offset: 0,
                        color: '#FF1493',
                    },
                    {
                        offset: 1,
                        color: '#0000FF',
                    },
                ]),
            },
        },
    },
    {
        name: 'CMM',
        symbol: 'circle',
        symbolSize: [20, 20],
        label: {
            color: '#efefef',
            position: 'left',
        },
        value: [1150,40],
        x: 1000,
        y: 1000,
        fixed: true,
        category: 2,
        itemStyle: {
            normal: {
                color: new echarts.graphic.LinearGradient(0, 1, 1, 0, [
                    {
                        offset: 0,
                        color: '#FF1493',
                    },
                    {
                        offset: 1,
                        color: '#0000FF',
                    },
                ]),
            },
        },
    },
    {
        name: 'OP140',
        symbol: 'circle',
        symbolSize: [20, 20],
        label: {
            color: '#efefef',
            position: 'bottom',
        },
        value: [950,85],
        x: 1000,
        y: 1000,
        fixed: true,
        category: 2,
        itemStyle: {
            normal: {
                color: new echarts.graphic.LinearGradient(0, 1, 1, 0, [
                    {
                        offset: 0,
                        color: '#FF1493',
                    },
                    {
                        offset: 1,
                        color: '#0000FF',
                    },
                ]),
            },
        },
    },
    {
        name: "OP150",
        symbol: 'circle',
        bianhua:"",
        symbolSize: [20, 20],
        label: {
            color: '#efefef',
            position: 'bottom',
        },
        value: [850,85],
        x: 1000,
        y: 1000,
        fixed: true,
        category: 2,
        itemStyle: {
            normal: {
                color: new echarts.graphic.LinearGradient(0, 1, 1, 0, [
                    {
                        offset: 0,
                        color: '#FF1493',
                    },
                    {
                        offset: 1,
                        color: '#0000FF',
                    },
                ]),
            },
        },
    },
    {
        name: 'OP160A',
        symbol: 'circle',
        symbolSize: [15, 15],
        label: {
            color: '#efefef',
            position: 'top',
        },
        value: [700,150],
        x: 1000,
        y: 1000,
        fixed: true,
        category: 2,
        itemStyle: {
            normal: {
                color: new echarts.graphic.LinearGradient(0, 1, 1, 0, [
                    {
                        offset: 0,
                        color: '#157eff',
                    },
                    {
                        offset: 1,
                        color: '#35c2ff',
                    },
                ]),
            },
        },
    },
    {
        name: 'OP160B',
        symbol: 'circle',
        symbolSize: [15, 15],
        label: {
            color: '#efefef',
            position: 'bottom',
        },
        value: [700,50],
        x: 1000,
        y: 1000,
        fixed: true,
        category: 2,
        itemStyle: {
            normal: {
                color: new echarts.graphic.LinearGradient(0, 1, 1, 0, [
                    {
                        offset: 0,
                        color: '#157eff',
                    },
                    {
                        offset: 1,
                        color: '#35c2ff',
                    },
                ]),
            },
        },
    },
    {
        name: 'OP170',
        symbol: 'circle',
        symbolSize: [20, 20],
        label: {
            color: '#efefef',
            position: 'top',
        },
        value: [150,150],
        x: 1000,
        y: 1000,
        fixed: true,
        category: 2,
        itemStyle: {
            normal: {
                color: new echarts.graphic.LinearGradient(0, 1, 1, 0, [
                    {
                        offset: 0,
                        color: '#FF1493',
                    },
                    {
                        offset: 1,
                        color: '#0000FF',
                    },
                ]),
            },
        },
    },
    {
        name: 'OP180',
        symbol: 'circle',
        symbolSize: [20, 20],
        label: {
            color: '#efefef',
            position: 'bottom',
        },
        value: [150,50],
        x: 1000,
        y: 1000,
        fixed: true,
        category: 2,
        itemStyle: {
            normal: {
                color: new echarts.graphic.LinearGradient(0, 1, 1, 0, [
                    {
                        offset: 0,
                        color: '#FF1493',
                    },
                    {
                        offset: 1,
                        color: '#0000FF',
                    },
                ]),
            },
        },
    },
    {
        name: 'OP190',
        symbol: 'circle',
        symbolSize: [20, 20],
        label: {
            color: '#efefef',
            position: 'bottom',
        },
        value: [300,50],
        x: 1000,
        y: 1000,
        fixed: true,
        category: 2,
        itemStyle: {
            normal: {
                color: new echarts.graphic.LinearGradient(0, 1, 1, 0, [
                    {
                        offset: 0,
                        color: '#FF1493',
                    },
                    {
                        offset: 1,
                        color: '#0000FF',
                    },
                ]),
            },
        },
    },
    {
        name: 'OP195',
        symbol: 'circle',
        symbolSize: [20, 20],
        label: {
            color: '#efefef',
            position: 'bottom',
        },
        value: [450,50],
        x: 1000,
        y: 1000,
        fixed: true,
        category: 2,
        itemStyle: {
            normal: {
                color: new echarts.graphic.LinearGradient(0, 1, 1, 0, [
                    {
                        offset: 0,
                        color: '#FF1493',
                    },
                    {
                        offset: 1,
                        color: '#0000FF',
                    },
                ]),
            },
        },
    },
    {
        name: 'SPC3',
        symbol: 'circle',
        symbolSize: [20, 20],
        label: {
            color: '#efefef',
            position: 'left',
        },
        value: [550,230],
        x: 1000,
        y: 1000,
        fixed: true,
        category: 2,
        itemStyle: {
            normal: {
                color: new echarts.graphic.LinearGradient(0, 1, 1, 0, [
                    {
                        offset: 0,
                        color: '#FF1493',
                    },
                    {
                        offset: 1,
                        color: '#0000FF',
                    },
                ]),
            },
        },
    },


];

 $.get("/bianhuadian",function (datapt){
                  var maodianm3=datapt.maodianm3;//['缸盖模块三OP150凸轮轴盖安装工位开展外包培训学习柔性。', '增加封板,避免铝屑回流进缸盖水腔', 'M3OP130工位增压机型增加冲洗程序', 'T21315寿命提升', 'T21382寿命提升']
                  var contdatam3=datapt.contdatam3;//['OP150', 'OP30B', 'OP130B', 'OP120', 'OP110A']
                    for (var i=0;i<maodianm3.length;i++){
                        for(let item of datawe){
                            if (maodianm3[i]===item.name){item["bianhua"]=contdatam3[i];}
                       }
                        }
                    optionchartditu = {
    title: {
        text: '变化点laylout图',
        textStyle: {
            color: 'white',
            fontSize: 20,
        },
        x: 'center',
        top: 10,
    },
    //不设置背景颜色就是透明色
    //backgroundColor: '#000',
    xAxis: {
        show: false,
        min: 0,
        max: 1200,
        type: "value",
        //开启x轴坐标
    },

    yAxis: {
        show: false,
        min: 0,
        max: 1200,
          type: "value",
        //开启y轴坐标
        axisPointer: {
                        	type: 'none'
                        },
    },

    tooltip: {
        show:true,
        trigger:'axis',
        triggerOn:"mousemove",
        showDelay:0,
        hideDelay:100,
        transitionDuration:0.4,
        formatter(params) {
        const item = params[0];
        return `
                变化点地址:${item['data'].name}</br>
                变化点内容:${item['data'].bianhua}
               `;
 },},
    //  legend: {
    //     show: false
    //  },
    series: [
        {
            type: 'graph',
            zlevel: 5,
            draggable: false,
            coordinateSystem: 'cartesian2d', //使用二维的直角坐标系(也称笛卡尔坐标系)

            // edgeSymbolSize: [0, 8], //边两端的标记大小,可以是一个数组分别指定两端,也可以是单个统一指定
            // edgeLabel: {
            //   normal: {
            //     textStyle: {
            //       fontSize: 60
            //     }
            //   }
            // },
            symbol: 'rect',
            symbolOffset: ['15%', 0],

            label: {
                normal: {
                    show: true,
                },
            },
            data: datawe,
            links: [
                {
                    source: 'OP05',
                    target: 'OP10A',
                    // lineStyle: {
                    //   normal: {
                    //     color: "#12b5d0",
                    //
                    //   }
                    // }
                },
                {
                    source: 'OP05',
                    target: 'OP10B',
                    lineStyle: {
                        normal: {
                            // color: "#12b5d0",
                        },
                    },
                },
                {
                    source: 'OP10A',
                    target: 'OP20A',
                    lineStyle: {
                        normal: {
                            // color: "#12b5d0",
                        },
                    },
                },
                {
                    source: 'OP10B',
                    target: 'OP20B',
                    lineStyle: {
                        normal: {
                            // color: "#12b5d0",
                        },
                    },
                },

                {
                    source: 'OP20A',
                    target: 'OP30A',
                    lineStyle: {
                        normal: {
                            // color: "#12b5d0",
                        },
                    },
                },

                {
                    source: 'OP20B',
                    target: 'OP30B',
                    lineStyle: {
                        normal: {
                            // color: "#12b5d0",
                        },
                    },
                },

                {
                    source: 'OP30A',
                    target: 'OP40A',
                    // lineStyle: {
                    //   normal: {
                    //     color: "#12b5d0",
                    //
                    //   }
                    // }
                },
                {
                    source: 'OP30B',
                    target: 'OP40B',
                    lineStyle: {
                        normal: {
                            // color: "#12b5d0",
                        },
                    },
                },
                {
                    source: 'OP40A',
                    target: 'OP50A',
                    lineStyle: {
                        normal: {
                            // color: "#12b5d0",
                        },
                    },
                },
                {
                    source: 'OP40B',
                    target: 'OP50B',
                    lineStyle: {
                        normal: {
                            // color: "#12b5d0",
                        },
                    },
                },
                {
                    source: 'OP50A',
                    target: 'OP60',
                    lineStyle: {
                        normal: {
                            // color: "#12b5d0",
                        },
                    },
                },
                {
                    source: 'OP50B',
                    target: 'OP60',
                    lineStyle: {
                        normal: {
                            // color: "#12b5d0",
                        },
                    },
                },
                {
                    source: 'OP60',
                    target: 'OP70',
                    lineStyle: {
                        normal: {
                            // color: "#12b5d0",
                        },
                    },
                },
                {
                    source: 'OP70',
                    target: 'OP80',
                    lineStyle: {
                        normal: {
                            // color: "#12b5d0",
                        },
                    },
                },
                {
                    source: 'OP80',
                    target: 'OP90A',
                    lineStyle: {
                        normal: {
                            // color: "#12b5d0",
                        },
                    },
                },
                {
                    source: 'OP80',
                    target: 'OP90B',
                    lineStyle: {
                        normal: {
                            // color: "#12b5d0",
                        },
                    },
                },
                {
                    source: 'OP90A',
                    target: 'OP100A',
                    lineStyle: {
                        normal: {
                            // color: "#12b5d0",
                        },
                    },
                },
                {
                    source: 'OP90B',
                    target: 'OP100B',
                    lineStyle: {
                        normal: {
                            // color: "#12b5d0",
                        },
                    },
                },
                {
                    source: 'OP100A',
                    target: 'OP110A',
                    lineStyle: {
                        normal: {
                            // color: "#12b5d0",
                        },
                    },
                },
                {
                    source: 'OP110A',
                    target: 'OP120A',
                    lineStyle: {
                        normal: {
                            // color: "#12b5d0",
                        },
                    },
                },
                {
                    source: 'OP120A',
                    target: 'OP130A',
                    lineStyle: {
                        normal: {
                            // color: "#12b5d0",
                        },
                    },
                },
                {
                    source: 'OP100B',
                    target: 'OP110B',
                    lineStyle: {
                        normal: {
                            // color: "#12b5d0",
                        },
                    },
                },
                //地铁二号线连接
                {
                    source: 'OP110B',
                    target: 'OP120B',
                    lineStyle: {
                        normal: {
                            // color: "#12b5d0",
                        },
                    },
                },
                {
                    source: 'OP120B',
                    target: 'OP130B',
                    lineStyle: {
                        normal: {
                           // color: "#12b5d0",
                        },
                    },
                },
                {
                    source: 'OP130A',
                    target: 'OP140',
                    lineStyle: {
                        normal: {
                            // color: "#12b5d0",
                        },
                    },
                },
                {
                    source: 'OP130B',
                    target: 'OP140',
                    lineStyle: {
                        normal: {
                            // color: "#12b5d0",
                        },
                    },
                },
                {
                    source: 'OP140',
                    target: 'OP150',
                    lineStyle: {
                        normal: {
                            // color: "#12b5d0",
                        },
                    },
                },
                {
                    source: 'OP150',
                    target: 'OP160A',
                    lineStyle: {
                        normal: {
                            // color: "#12b5d0",
                        },
                    },
                },
                {
                    source: 'OP150',
                    target: 'OP160B',
                    lineStyle: {
                        normal: {
                            // color: "#12b5d0",
                        },
                    },
                },
                {
                    source: 'OP160A',
                    target: 'OP170',
                    lineStyle: {
                        normal: {
                            // color: "#12b5d0",
                        },
                    },
                },
                {
                    source: 'OP160B',
                    target: 'OP160A',
                    lineStyle: {
                        normal: {
                            // color: "#12b5d0",
                        },
                    },
                },
                {
                    source: 'OP170',
                    target: 'OP180',
                    lineStyle: {
                        normal: {
                            // color: "#12b5d0",
                        },
                    },
                },
                {
                    source: 'OP180',
                    target: 'OP190',
                    lineStyle: {
                        normal: {
                           // color: "#12b5d0",
                        },
                    },
                },
                {
                    source: 'OP190',
                    target: 'OP195',
                    lineStyle: {
                        normal: {
                            // color: "#12b5d0",
                        },
                    },
                },




            ],
            lineStyle: {
                normal: {
                    opacity: 0.6, //线条透明度
                    color: '#53B5EA',
                    curveness: 0, //站点间连线曲度,0表示直线
                    width: 10, //线条宽度
                },
            },
        },
     /**   {
            type: 'lines',
            coordinateSystem: 'cartesian2d',
            z: 1,
            zlevel: 7,
            animation: true,
            effect: {
                show: true,
                period: 5,
                trailLength: 0.71,
                symbolSize: 14,
                symbol: 'circle',
                loop: true,
                color: 'yellow',
                //   color: "rgba(55,155,255,0.5)"
            },
            lineStyle: {
                normal: {
                    // color: "green",
                    width: 0,
                    curveness: 0, //动画线路的曲度
                },
            },

            data: [
                {
                    //一号线
                    coords: [
                        [5, 600],
                        [100, 750],
                    ],
                },
                {
                    //一号线
                    coords: [
                        [5, 600],
                        [100, 450],
                    ],
                },
                {
                    //一号线
                    coords: [
                        [100, 750],
                        [500,750]
                    ],
                },
                {
                    //一号线
                    coords: [
                        [100, 450],
                        [500,450]
                    ],
                },
                {
                    //一号线
                    coords: [
                        [500, 750],
                        [600, 600],
                    ],
                },
                {
                    //一号线
                    coords: [
                        [500, 450],
                        [600, 600],
                    ],
                },
                {
                    //一号线
                    coords: [
                        [600,600],
                        [700, 750],
                    ],
                },
                {
                    //一号线
                    coords: [
                        [700, 750],
                        [950, 750],
                    ],
                },
                {
                    //一号线
                    coords: [
                        [950, 750],
                        [900, 650],
                    ],
                },
                {
                    //一号线
                    coords: [
                        [950, 750],
                        [1000, 650],
                    ],
                },
                {
                    //一号线
                    coords: [
                        [900, 650],
                        [900,250],
                    ],
                },
                {
                    //一号线
                    coords: [
                        [1000, 650],
                        [1000,250],
                    ],
                },
                {
                    //一号线
                    coords: [
                        [1000,250],
                        [950,80],
                    ],
                },
                {
                    //一号线
                    coords: [
                        [900,250],
                        [950,80],
                    ],
                },
                {
                    //一号线
                    coords: [
                        [950,80],
                        [850,80],
                    ],
                },
                {
                    //一号线
                    coords: [
                        [850,80],
                        [700,150],
                    ],
                },
                {
                    //一号线
                    coords: [
                        [850,80],
                        [700,50],
                    ],
                },
                {
                    //一号线
                    coords: [
                        [700,150],
                        [150,150]
                    ],
                },
                {
                    //一号线
                    coords: [
                        [150,150],[150,50],
                    ],
                },
                {
                    //一号线
                    coords: [
                        [150,50],
                        [450,50]
                    ],
                },
                //{
                    //二号线
                //    coords: [
                //        [680, 50],
                //        [680, 1050],
                //    ],
                //},
                //   {  //三号线
                //     coords: [
                //       [280, 350],
                //       [1040, 1080]
                //     ]
                //   }
            ],
        },**/
    ],
};
                    optionchartditu&& myChartchartditu.setOption(optionchartditu);
                })







 

您好,我是有问必答小助手,您的问题已经有小伙伴解答了,您看下是否解决,可以追评进行沟通哦~

如果有您比较满意的答案 / 帮您提供解决思路的答案,可以点击【采纳】按钮,给回答的小伙伴一些鼓励哦~~

ps:问答VIP仅需29元,即可享受5次/月 有问必答服务,了解详情>>>https://vip.csdn.net/askvip?utm_source=1146287632