near-zero and near-100 rounding option
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 38/100
- Issue type
- Feature
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- d3, javascript
- Domain
- data-visualization
Research direction
Start by reading the percent-formatting implementation and its tests to find where rounding and format options are handled. Add a flag for displaying values that round to 0% or 100% as threshold labels such as <0.1% or >99.9%, then verify the new behavior with tests covering values near both endpoints.
Written by the indexing model from the issue text.
Description
Right now using a simple percent format like:
const f = format('.1%')
Gives misleading results near 0 and 100:
f(0.0001) // 0.0%
f(0.9999) // 100.0%
Even though these are technically correct from a rounding perspective, they lead to confusion for users because it reads as "absolute". Which is why it's common to instead refer these as:
<0.1%
>99.9%
It would be really nice if there was a flag for this style of percentage formatting.
- Dominant language
- JavaScript
- Stars
- 643
- Forks
- 107
- Avg merge
- 6h 25m
- Merged PRs (30d)
- 1
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from d3/d3-format
-
Difficulty 3/5 1-2 days Newbie friendliness 45/100
-
formatPrefix will sometimes not perform roundingMay be free again A pull request for this issue was closed without being merged. Open
Difficulty 2/5 1-3 hours Newbie friendliness 35/100
-
Difficulty 3/5 1-2 days Newbie friendliness 35/100
-
Difficulty 4/5 3-5 days Newbie friendliness 46/100
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
Similar issues
-
maintenance
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
assistant-ui/assistant-ui#10496 · 1 comment · 1 reaction ·
Maintainers usually reply within 1 day
-
ai bug design good first issue
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
neomjs/neo-agent-institution#927 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
gramps-project/gramps-web#1671 ·
Maintainers usually reply within 1 day
-
bug good first issue priority: P2 status: ready
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
RhinoLink-Tech/data-fabric#502 ·
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 75/100
cline/mcp-marketplace#3708 ·