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

请问有考虑过韦恩图么? #36

Closed
YuxinChou opened this issue Nov 14, 2016 · 4 comments
Closed

请问有考虑过韦恩图么? #36

YuxinChou opened this issue Nov 14, 2016 · 4 comments

Comments

@YuxinChou
Copy link

如题,想绘制韦恩图。
目前较能用的绘制方法是使用d3.js,在echarts2.0也有一个简单的,但是echarts3.0后就给砍了,不知道G2可不可以绘制,谢谢。

@dxq613
Copy link
Member

dxq613 commented Nov 18, 2016

韦恩图的问题,其实在于如何表示数据,韦恩图的几个关系 交、并、包含、互斥之类的,如何表达在数据中,如何自动布局都需要考虑清楚才能做,两两之间的关系、甚至多个个节点之间的关系也比较麻烦。

一个本质的问题是你绘制韦恩图的目的是为了自动布局,还是位置事先已经有了,仅仅来表达两者之间的关系,如果相交的话颜色是否要变换。

@YuxinChou
Copy link
Author

自动布局、宽度适配、相交变换、label信息、交互都需要。

@dxq613
Copy link
Member

dxq613 commented Nov 21, 2016

如果这样的话,数据模型本身就要比较复杂,节点和关系需要两份数据

var nodes = [{name: 'a', value: xxx},{name:'b',value:xxx}];

var relations = [{relation: 'a-b',type: 'union'},{relation: 'b-c',type: 'union'}.....];

var layout = new Layout.Wayne({nodes: nodes,relations: realtions});

view.point().position('x*y').color('xxx').size('value').shape('vayne');

@dxq613
Copy link
Member

dxq613 commented Dec 15, 2016

结论:暂时不在g2上专门实现韦恩图

@dxq613 dxq613 closed this as completed Dec 15, 2016
simaQ pushed a commit that referenced this issue Nov 22, 2017
simaQ added a commit that referenced this issue Nov 22, 2017
fixed bug of #36



See merge request !71
simaQ pushed a commit that referenced this issue Nov 22, 2017
simaQ added a commit that referenced this issue Nov 22, 2017
fixed bug of #36



See merge request !71
simaQ pushed a commit that referenced this issue Nov 22, 2017
simaQ added a commit that referenced this issue Nov 22, 2017
fixed bug of #36



See merge request !71
simaQ pushed a commit that referenced this issue Nov 22, 2017
simaQ added a commit that referenced this issue Nov 22, 2017
fixed bug of #36



See merge request !71
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants