Skip to content

Conversation

@JCQuintas
Copy link
Member

@JCQuintas JCQuintas commented Mar 17, 2025

Resolves #16205

Main change

Use use-gesture to recognise the gestures. Right now the lib is a bit slow to have updates, but it has some solid behaviour detection.

Create a interaction listener plugin. This allows us to register events directly in the SVG.

The current implementation migrates most of the interactions to the schema below.

Screenshot 2025-03-19 at 22 40 10

Other changes

  • Add zoom and pan tests for BarChartPro, LineChartPro, and ScatterChartPro
    • Currently we can't properly test the pinch interaction. It seems RTL and use-gesture can't communicate properly there.
    • I've tried manual events as well (fireEvent/element.dispatchEvent), but couldn't figure out a way to make it work.
  • Divided the zoom behaviours into hooks implementing the usePanOnDrag, useZoomOnPinch and useZoomOnWheel hooks

@github-actions
Copy link

This pull request has conflicts, please resolve those before we can evaluate the pull request.

@JCQuintas JCQuintas force-pushed the pointer-events-improvement branch from 76ab4f5 to 0edea79 Compare March 21, 2025 14:03
Comment on lines 29 to 31
xAxis={[
{
zoom: true,
Copy link
Member

Choose a reason for hiding this comment

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

If you'r lookig for what triggers the re-render. I'ts probably the xAxis

@github-actions github-actions bot removed the PR: out-of-date The pull request has merge conflicts and can't be merged. label Mar 25, 2025
@github-actions github-actions bot added the PR: out-of-date The pull request has merge conflicts and can't be merged. label Mar 28, 2025
@github-actions
Copy link

This pull request has conflicts, please resolve those before we can evaluate the pull request.

@github-actions github-actions bot removed the PR: out-of-date The pull request has merge conflicts and can't be merged. label Apr 3, 2025
@github-actions
Copy link

github-actions bot commented Apr 6, 2025

This pull request has conflicts, please resolve those before we can evaluate the pull request.

@github-actions github-actions bot added the PR: out-of-date The pull request has merge conflicts and can't be merged. label Apr 6, 2025
@github-actions github-actions bot added PR: out-of-date The pull request has merge conflicts and can't be merged. and removed PR: out-of-date The pull request has merge conflicts and can't be merged. labels Apr 7, 2025
@github-actions
Copy link

This pull request has conflicts, please resolve those before we can evaluate the pull request.

@github-actions
Copy link

This pull request has been inactive for 30 days. Please remove the stale label or leave a comment to keep it open. Otherwise, it will be closed in 15 days.

@github-actions github-actions bot added the stale Inactive for 7 days (issues) or 30 days (PRs); closed after 5 or 15 more days if no update. label May 14, 2025
@github-actions
Copy link

This pull request has been closed due to 15 days of inactivity after being marked stale.

@github-actions github-actions bot closed this May 29, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

PR: out-of-date The pull request has merge conflicts and can't be merged. scope: charts Changes related to the charts. stale Inactive for 7 days (issues) or 30 days (PRs); closed after 5 or 15 more days if no update. type: enhancement It’s an improvement, but we can’t make up our mind whether it's a bug fix or a new feature.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[charts] Create a gesture manager to improve pointer interactions

4 participants