Skip to content

Conversation

@joshkel
Copy link
Contributor

@joshkel joshkel commented Nov 20, 2024

I believe this is a better UI, and it also fixes some issues with incorrect zoom ranges when dragging the rectangle outside of the chart area.

To help implement this, I copied the clamp helper function from chartjs-plugin-annotation.

Fixes #895

I believe this is a better UI, and it also fixes some issues with incorrect zoom ranges when dragging the rectangle outside of the chart area.

To help implement this, I copied the clamp helper function from chartjs-plugin-annotation.

Fixes chartjs#895
Copy link
Member

@kurkle kurkle left a comment

Choose a reason for hiding this comment

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

A test would be good to prevent regressions in the future 🙂

@joshkel
Copy link
Contributor Author

joshkel commented Nov 21, 2024

@kurkle Done.

@joshkel joshkel force-pushed the drag-outside-chart-area branch from cf52bda to 293d472 Compare November 21, 2024 18:16
@joshkel joshkel force-pushed the drag-outside-chart-area branch from 293d472 to 36fe2c2 Compare November 21, 2024 18:17
@kurkle kurkle added the bug label Nov 21, 2024
@kurkle kurkle merged commit 2dabfe4 into chartjs:master Nov 21, 2024
6 checks passed
@joshkel joshkel deleted the drag-outside-chart-area branch November 21, 2024 19:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Unwanted behavior when dragging outside of chart area

2 participants