Skip to content

docs(util): correct percentage total in number helper comments - #21869

Open
linzch3 wants to merge 1 commit into
apache:masterfrom
linzch3:fix/documentation-percentage-total
Open

linzch3 wants to merge 1 commit into
apache:masterfrom
linzch3:fix/documentation-percentage-total

Conversation

@linzch3

@linzch3 linzch3 commented Nov 23, 2026

Copy link
Copy Markdown

Brief Information

  • bug fixing
  • new feature
  • others: documentation only

What does this PR do?

Correct the documented percentage total from 1 to 100 in getPercentWithPrecision and getPercentSeats.

Fixed issues

None. Found while checking the helper documentation against its implementation.

Details

Before: What was the problem?

Both comments say the percentages sum to 1, but the implementation allocates 10^precision * 100 seats and returns values on a 0–100 scale.

After: How does it behave after the fixing?

The comments say 100 and qualify this with a nonzero total, since zero-total input returns no seats. Runtime behavior is unchanged.

Document Info

  • Documentation changes are included in this PR (source comments only).

Misc

Security Checking

  • This PR uses security-sensitive Web APIs.

ZRender Changes

  • This PR depends on ZRender changes.

Related test cases or examples to use the new APIs

npm test -- --runInBand: 26 suites, 194 tests passed.

Merging options

  • Please squash the commits into a single one when merging.

Other information

Generated-by: AI-assisted. The comments were checked against the implementation and existing percentage tests.

@echarts-bot

echarts-bot Bot commented Nov 23, 2026

Copy link
Copy Markdown

Thanks for your contribution!
The community will review it ASAP. In the meanwhile, please checkout the coding standard and Wiki about How to make a pull request.

Please DO NOT commit the files in dist, i18n, and ssr/client/dist folders in a non-release pull request. These folders are for release use only.

To reviewers: If this PR is going to be described in the changelog in the future release, please make sure this PR has one of the following labels: PR: doc ready, PR: awaiting doc, PR: doc unchanged

This message is shown because the PR description doesn't contain the document related template.

This branch has not been deployed

No deployments
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.

1 participant