Skip to content

fix: 修复词云图 legend 配置不起效 修复 词云图 color 回调缺少其他数据 #2787

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 3 commits into from
Aug 13, 2021
Merged

fix: 修复词云图 legend 配置不起效 修复 词云图 color 回调缺少其他数据 #2787

merged 3 commits into from
Aug 13, 2021

Conversation

ai-qing-hai
Copy link
Contributor

  • 修复 词云图 legend 配置不生效的bug

image

  • 因为 词云图的数据data 是内部重新计算的, 导致color rawFileds 的回调 不能返回。 现在默认添加datum 到 color 回调。

@coveralls
Copy link

Pull Request Test Coverage Report for Build 1119541944

  • 7 of 7 (100.0%) changed or added relevant lines in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage decreased (-0.003%) to 95.557%

Totals Coverage Status
Change from base Build 1119141350: -0.003%
Covered Lines: 6338
Relevant Lines: 6465

💛 - Coveralls

@visiky visiky linked an issue Aug 13, 2021 that may be closed by this pull request
@visiky
Copy link
Member

visiky commented Aug 13, 2021

主要原因是:内部将 color 映射字段转换为 color 属性了,如下:

image

image

@visiky
Copy link
Member

visiky commented Aug 13, 2021

在 word-cloud/constant.ts 中 export 一个 COLOR_FIELD 字段,然后在 adaptor 中去使用(有两处:geometry、legend),其他暂时不改(文档部分说明,等这个 PR 合并之后,我来写)

/** 词云图 color 通道映射字段 */
export const WORD_CLOUD_COLOR_FIELD = 'color';

image

@visiky visiky merged commit ec47b76 into antvis:master Aug 13, 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.

🐛 [BUG] 词云,legend样式配置失效
3 participants