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

fix(heatmap): 添加 meta 中的最大最小值参数 可以控制最小显示参数 #3272

Merged
merged 3 commits into from
Jul 12, 2022

Conversation

ai-qing-hai
Copy link
Contributor

  • 加入 meta 影响最大最小值显示
Before After
image image

fixed #3170

@github-actions
Copy link
Contributor

github-actions bot commented Jul 8, 2022

🎊 PR Preview 22c132c has been successfully built and deployed to https://antvis-G2Plot-preview-pr-3272.surge.sh?type=diff&date=2022-07-11

🕐 Build time: 73.716s

🤖 By Surge Ui Insight

@hustcc hustcc requested a review from visiky July 11, 2022 08:50
const max = Math.max(...field);
let { min, max } = meta?.[sizeField] || {};
min = min || Math.min(...field);
max = max || Math.max(...field);
Copy link
Member

Choose a reason for hiding this comment

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

min max 等于 0 怎么办?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

没考虑到~。重新修改了

@ai-qing-hai ai-qing-hai requested a review from hustcc July 11, 2022 08:53
@hustcc
Copy link
Member

hustcc commented Jul 11, 2022

单测中似乎有 lint 错误。

@ai-qing-hai
Copy link
Contributor Author

@hustcc 少了个换行, 已经加上了

@visiky visiky merged commit 2800e72 into master Jul 12, 2022
@visiky visiky deleted the fix-heatmap-min branch July 12, 2022 03:00
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] g2plot 2.x 热力图,开启 尺寸映射,颜色映射
3 participants