Skip to content

Conversation

visiky
Copy link
Member

@visiky visiky commented Jul 19, 2021

PR includes

Screenshot

Before After

@github-actions
Copy link
Contributor

github-actions bot commented Jul 19, 2021

🎊 PR Preview 86f10d2 has been successfully built and deployed to https://antvis-G2Plot-preview-pr-2708.surge.sh?type=diff&date=2021-07-19

🕐 Build time: 91.953s

🤖 By surge-preview

@coveralls
Copy link

Pull Request Test Coverage Report for Build 1044752198

  • 9 of 9 (100.0%) changed or added relevant lines in 4 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.004%) to 95.739%

Totals Coverage Status
Change from base Build 1030430643: 0.004%
Covered Lines: 6270
Relevant Lines: 6381

💛 - Coveralls

@visiky visiky requested a review from hustcc July 19, 2021 11:49
@@ -41,7 +45,7 @@ export function binHistogram(data: Data, binField: string, binWidth: number, bin
// 计算分箱,直方图分箱的计算基于 binWidth,如配置了 binNumber 则将其转为 binWidth 进行计算
let _binWidth = binWidth;
if (!binWidth && binNumber) {
_binWidth = rangeWidth / binNumber;
_binWidth = binNumber > 1 ? rangeWidth / (binNumber - 1) : range.max;
Copy link
Member Author

Choose a reason for hiding this comment

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

主要修改点

@hustcc hustcc merged commit 46d2769 into master Jul 19, 2021
@hustcc hustcc deleted the fix-histogram branch July 19, 2021 12:02
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]直方图的最后一个分箱总是只有一个,且最后显示的分箱数量比binNumber大1
3 participants