Skip to content

fix: 修改桑基图 的 来源字段 type 类型为cat #2513

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

Merged
merged 2 commits into from
Apr 27, 2021
Merged

fix: 修改桑基图 的 来源字段 type 类型为cat #2513

merged 2 commits into from
Apr 27, 2021

Conversation

ai-qing-hai
Copy link
Contributor

PR includes

  • 修改 桑基图 来源字段 type 默认为 cat

@@ -77,7 +77,7 @@ function geometry(params: Params<SankeyOptions>): Params<SankeyOptions> {
chart.scale({
x: { sync: true, nice: true, min: 0, max: 1, minLimit: 0, maxLimit: 1 },
y: { sync: true, nice: true, min: 0, max: 1, minLimit: 0, maxLimit: 1 },
name: { sync: 'color' },
name: { sync: 'color', type: 'cat' },
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

启动一下官网 demo,看看有没有问题。

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • 更改了的
    image
  • 旧的
    image

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • 原来 是timecat 如果传入的是时间类型的来源字段, 其他不是时间的会呈现 默认颜色。 而传入的不是时间类型的来源字段。 颜色会按照顺序分配。
  • 现在 是 cat 所以,无论是来源字段是 时间类型还是分类 颜色都是按照顺序分配

@hustcc
Copy link
Member

hustcc commented Apr 25, 2021

加一个单元测试吧,参考其他的写法。

@hustcc hustcc merged commit c2e0d53 into antvis:master Apr 27, 2021
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.

2 participants