echarts icon indicating copy to clipboard operation
echarts copied to clipboard

graph图连接线箭头问题

Open WebsonLeo opened this issue 10 years ago • 4 comments

问题简述 (One-line summary)

graph在symbol为正方形,或者引用的图片为方形图片并且连接线是有倾斜角度时,会出现箭头被symbol覆盖的情况

版本及环境 (Version & Environment)

  • ECharts 版本 (3.2.2):
  • 浏览器类型和版本 (Chrome 版本 51.0.2704.106 m):
  • 操作系统类型和版本 (windows7 专业版):

重现步骤 (Steps to reproduce)

1.设置graph图的symbol为rect,将symbolSize设置的稍大一些。设置两个点在的坐标x和y都不同,设置一条带箭头的连接线,连接这两个点 2.setOption

期望结果 (Expected behaviour)

能够出现带箭头的连接线,连接两个正方形的symbol

可能哪里有问题 (What went wrong)

ECharts配置项 (ECharts option)

option = {
    title: {
        text: 'Graph 简单示例'
    },
    tooltip: {},
    animationDurationUpdate: 1500,
    animationEasingUpdate: 'quinticInOut',
    series : [
        {
            type: 'graph',
            layout: 'none',
            symbol:'rect',
            symbolSize: 80,
            roam: true,
            label: {
                normal: {
                    show: true
                }
            },
            edgeSymbol: ['circle', 'arrow'],
            edgeSymbolSize: [4, 10],
            edgeLabel: {
                normal: {
                    textStyle: {
                        fontSize: 20
                    }
                }
            },
            data: [{
                name: '节点1',
                x: 300,
                y: 300
            }, {
                name: '节点2',
                x: 800,
                y: 300
            }, {
                name: '节点3',
                x: 550,
                y: 100
            }, {
                name: '节点4',
                x: 550,
                y: 500
            }],
            // links: [],
            links: [{
                source: 0,
                target: 1,
                symbolSize: [5, 20],
                label: {
                    normal: {
                        show: true
                    }
                },
                lineStyle: {
                    normal: {
                        width: 5,
                        curveness: 0.2
                    }
                }
            }, {
                source: '节点2',
                target: '节点1',
                label: {
                    normal: {
                        show: true
                    }
                },
                lineStyle: {
                    normal: { curveness: 0.2 }
                }
            }, {
                source: '节点1',
                target: '节点3'
            }, {
                source: '节点2',
                target: '节点3'
            }, {
                source: '节点2',
                target: '节点4'
            }, {
                source: '节点1',
                target: '节点4'
            }],
            lineStyle: {
                normal: {
                    opacity: 0.9,
                    width: 2,
                    curveness: 0
                }
            }
        }
    ]
};

其他信息 (Other comments)

image

WebsonLeo avatar Aug 10 '16 02:08 WebsonLeo

连线处理箭头位置的时候统一都把节点当做圆形来处理了

pissang avatar Aug 18 '16 15:08 pissang

5.3.3版本 还有这个问题.....

ws2823147532 avatar Jul 19 '22 04:07 ws2823147532

5.3.3版本 还有这个问题.....

GitHubJian avatar Aug 03 '22 09:08 GitHubJian

hais

连线处理箭头位置的时候统一都把节点当做圆形来处理了 问题还是没解决呀,为啥给关闭了

wangchaoHeart avatar Dec 12 '22 06:12 wangchaoHeart