Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Expose gestureHandlerConfig prop in CartesianChart for gesture custom… #517

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

vasylmar
Copy link

@vasylmar vasylmar commented Mar 3, 2025

Description

This PR enhances the CartesianChart component by introducing a new gestureHandlerConfig prop. This allows users to customize gesture handling behavior via the GestureHandlerConfig type.

Resolves #516

Type of Change

  • Added types to GestureHandlerConfig to provide better type safety.
  • Added gestureHandlerConfig prop to GestureHandler so it can accept custom configurations.
  • Exposed gestureHandlerConfig in CartesianChart and passed it down to GestureHandler.
  • New feature (non-breaking change which adds functionality)

How Has This Been Tested?

  • Ran the existing test suite to ensure no regressions.
  • Manually tested the changes locally to verify correct behavior.
  • No additional tests were written since this is a minor change that integrates with existing functionality.

Let me know if any additional testing is required! 🚀

Checklist: (Feel free to delete this section upon completion)

  • I have included a changeset if this change will require a version change to one of the packages.
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have run yarn run check:code and all checks pass
  • I have created a changeset for new features, patches, or major changes
  • I have added tests that prove my fix is effective or that my feature works
  • My changes generate no new warnings
  • Any dependent changes have been merged and published in downstream modules

Copy link

vercel bot commented Mar 3, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
victory-native-xl-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 9, 2025 10:30am

@zibs
Copy link
Contributor

zibs commented Apr 4, 2025

Thanks @vasylmar - can you add a changeset (minor)?

Copy link

changeset-bot bot commented Apr 4, 2025

🦋 Changeset detected

Latest commit: 8484b34

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
victory-native Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@@ -83,6 +84,7 @@ type CartesianChartProps<
chartPressConfig?: {
pan?: ChartPressPanConfig;
};
gestureHandlerConfig: GestureHandlerConfig;
Copy link
Contributor

Choose a reason for hiding this comment

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

should be optional

Copy link
Author

Choose a reason for hiding this comment

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

I’ve updated the gestureHandlerConfig to be optional in the latest commit.

@zibs
Copy link
Contributor

zibs commented Apr 4, 2025

Also feel free to hit the update branch button

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Expose gestureHandlerConfig prop in CartesianChart for gesture customization and control
2 participants