brushX with `values` can shorten the selection range when it’s dragged to the plot edge
Maintainers usually reply within 1 day
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 78/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- d3, typescript
- Domain
- data-visualization
Research direction
Start from the brushX implementation in this repo (search for where explicit values are used to round the selection endpoints when dragging) and read how each endpoint is snapped independently. Reproduce with the linked jsfiddle steps: drag a 3-day selection to the plot edge and watch it shrink. Done means both endpoints round against the same reference so the selection keeps its width at the edges, verified by a test or manual check that the range stays 2024-01-02..2024-01-04 through repeated edge drags.
Written by the indexing model from the issue text.
Description
When a brushX with explicit values sits over an x domain that extends past its first and last values, dragging the selected range all the way to either edge of the plot may shorten the selected range by one value. Each further drag to an edge can shorten it again. This happens due to independent rounding of the two endpoints.
Reproduction: https://jsfiddle.net/anderskaseorg/ty3hz9m8/
- Open the page. The range is 2024-01-02 to 2024-01-04 (3 days).
- Drag the selection all the way to the left. The range shortens to 2024-01-01 to 2024-01-02 (2 days).
- Drag the selection all the way to the right. The range shortens to 2024-01-05 to 2024-01-05 (1 day).
- Dominant language
- TypeScript
- Stars
- 819
- Forks
- 49
- Avg merge
- 8h 8m
- Merged PRs (30d)
- 11
Getting set up
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
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 TanStack/charts
-
Renderer treats a sub-pixel width difference as a resize, which cancels the `motion()` entranceOpen
Difficulty 1/5 Under an hour Newbie friendliness 85/100
Maintainers usually reply within 1 day
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
Maintainers usually reply within 1 day
-
Difficulty 3/5 1-2 days Newbie friendliness 58/100
Maintainers usually reply within 1 day
-
Difficulty 4/5 3-5 days Newbie friendliness 25/100
Maintainers usually reply within 1 day
-
Difficulty 3/5 Half a day Newbie friendliness 45/100
Maintainers usually reply within 1 day
Similar issues
-
Difficulty 1/5 Under an hour Newbie friendliness 72/100
yjh051108/dsh-routing-suite#216 ·
-
kind/bug priority/needs-triage
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 1 day
-
Dependencies view: `getParent` loops forever on untitled documents, extension host runs out of memoryPossibly taken A pull request linked to this issue is open or already merged. Openbug
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
Maintainers usually reply within 1 day
-
enhancement good first issue
Difficulty 2/5 Half a day Newbie friendliness 66/100
apache/fineract-consumer-facing#175 ·
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 Under an hour Newbie friendliness 82/100
awslabs/visual-asset-management-system#413 ·
Maintainers usually reply within 1 day