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

feat: add plot chord (增加弦图) #2073

Merged
merged 17 commits into from
Dec 18, 2020
Merged

feat: add plot chord (增加弦图) #2073

merged 17 commits into from
Dec 18, 2020

Conversation

MrSmallLiu
Copy link
Contributor

@MrSmallLiu MrSmallLiu commented Dec 4, 2020

  • adaptor
  • tests
  • docs
  • example

image

@hustcc
Copy link
Member

hustcc commented Dec 4, 2020

@MrSmallLiu 感谢感谢,可以加我钉钉,我拉你进开发群。 我的钉钉 hustcc 。

@coveralls
Copy link

coveralls commented Dec 4, 2020

Pull Request Test Coverage Report for Build 429810100

  • 202 of 202 (100.0%) changed or added relevant lines in 7 files are covered.
  • 1 unchanged line in 1 file lost coverage.
  • Overall coverage increased (+0.03%) to 96.746%

Files with Coverage Reduction New Missed Lines %
src/plots/liquid/shapes/liquid.ts 1 93.0%
Totals Coverage Status
Change from base Build 424664140: 0.03%
Covered Lines: 4369
Relevant Lines: 4407

💛 - Coveralls

@hustcc
Copy link
Member

hustcc commented Dec 4, 2020

主要三个大问题需要考虑:

  1. weightField 需要区分 source 和 target 吗?看看其他图表库怎么处理的。
  2. 节点间距和宽度的,建议和 桑基图保持一致
  3. 和桑基图有多少代码复用

@visiky
Copy link
Member

visiky commented Dec 7, 2020

看下 highcharts 的 和弦图,应该数据结构是和桑基图一致的

@MrSmallLiu
Copy link
Contributor Author

@hustcc @me-momo 关于和弦图的数据结构。highCharts数据结构是只有value,D3看到一个示例也是只有value,echarts可能我没找到设置线宽度的值。绝大多数情况应该都是只有一个值,但是一些其它示例对于和弦图两端是可以不同宽度的。G2目前也是支持。那这块是怎么考虑呢?是两种都支持比如如果两者都存在(sourceWeightField&targetWeightField)优先级高于(weightField),还是就只支持设置一个value呢?
image

@hustcc
Copy link
Member

hustcc commented Dec 7, 2020

@hustcc @me-momo 关于和弦图的数据结构。highCharts数据结构是只有value,D3看到一个示例也是只有value,echarts可能我没找到设置线宽度的值。绝大多数情况应该都是只有一个值,但是一些其它示例对于和弦图两端是可以不同宽度的。G2目前也是支持。那这块是怎么考虑呢?是两种都支持比如如果两者都存在(sourceWeightField&targetWeightField)优先级高于(weightField),还是就只支持设置一个value呢?
image

竞品里面有做 sourceWeightField&targetWeightField 的吗?如果没有那就先只做 weightField,后面有真正的业务场景在做 sourceWeightField&targetWeightField,不能因为技术上有这个能力,就一定要暴露出来。

和弦图配置修改与桑基图一致; 增加tanformDataToNodeLinkData让和弦图、桑基图复用,同时增加单测;
@hustcc
Copy link
Member

hustcc commented Dec 17, 2020

代码上我感觉问题不大了,剩下的可以吧单测多搞搞了。

@hustcc
Copy link
Member

hustcc commented Dec 18, 2020

@me-momo @lxfu1 再次 cr 一下,没有其他问题,就合并掉了~

@visiky visiky linked an issue Dec 18, 2020 that may be closed by this pull request
@visiky visiky merged commit 3e7671c into antvis:master Dec 18, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

G2Plot v2 正在激情开发中,欢迎前来指导...
4 participants