Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

关系图circular只有两个节点时节点会重叠 #4084

Closed
lastmayday opened this issue Sep 14, 2016 · 1 comment
Closed

关系图circular只有两个节点时节点会重叠 #4084

lastmayday opened this issue Sep 14, 2016 · 1 comment

Comments

@lastmayday
Copy link

问题简述 (One-line summary)

关系图的 layout 设置为 circular, 如果 data 只有两个节点, 那么这两个节点会重叠

版本及环境 (Version & Environment)

  • ECharts 版本 (ECharts version):3.2.3
  • 浏览器类型和版本 (Browser version):Chrome 版本 52.0.2743.116 (64-bit)
  • 操作系统类型和版本 (OS Version):OS X El Captian 10..11.5

重现步骤 (Steps to reproduce)

  1. 关系图的 layout 设置为 circular
  2. data 只有两个数据

期望结果 (Expected behaviour)

两个节点分开显示

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

ECharts配置项 (ECharts option)

option = {
            title: {
                text: 'test',
                top: 'bottom',
                left: 'right'
            },
            legend: [{
                data: me.categories.map(function (a) {
                    return a.name;
                })
            }],
            animationDurationUpdate: 1500,
            animationEasingUpdate: 'quinticInOut',
            tooltip: {
                trigger: 'item',
                position: function (point) {
                    return [point[0], 0];
                }
            },
            series : [{
                type: 'graph',
                layout: 'circular',
                data: [{
                    id: 'aaa',
                    name: 'aaa',
                    value: 'aaa',
                    symbolSize: 10,
                    tooltip: {
                        formatter: function (params) {
                            return params.name + ' <br> ' + params.value;
                        }
                    },
                    category: 0
                }, {
                    id: 'bbb',
                    name: 'bbb',
                    value: 'bbb',
                    symbolSize: 10,
                    tooltip: {
                        formatter: function (params) {
                            return params.name + ' <br> ' + params.value;
                        }
                    },
                    category: 1
                }],
                links: [],
                label: {
                    normal: {
                        position: 'right',
                        show: true
                    }
                },
                roam: true,
                categories: me.categories,
                focusNodeAdjacency: true,
                lineStyle: {
                    normal: {
                        width: 1,
                        curveness: 0.3,
                        opacity: 0.7
                    }
                }
            }]
}

其他信息 (Other comments)

节点重叠

@la0wang
Copy link

la0wang commented Sep 30, 2016

只要是偶数,就会重叠,很纠结。。。

@100pah 100pah closed this as completed in f9707fd Oct 8, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants