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

tracking hook #342

Open
wadjih-bencheikh18 opened this issue Feb 18, 2022 · 3 comments
Open

tracking hook #342

wadjih-bencheikh18 opened this issue Feb 18, 2022 · 3 comments

Comments

@wadjih-bencheikh18
Copy link
Member

In the old version we had two diffrent functionalties in tracking

  • onMove : track mouse coordinates
  • onClick : get closest point coordinates

https://deploy-preview-269--react-plot.netlify.app/?path=/story/api-tracking--tracking-example

@wadjih-bencheikh18
Copy link
Member Author

i'm not sure why we didn't create simple hook for tracking
https://github.com/zakodium/react-plot/blob/main/stories/control/tracking.stories.tsx

@stropitek
Copy link
Contributor

stropitek commented Feb 21, 2022

Because it's not clear yet what a common use case for tracking is. We don't know yet what to aim for so we decided to only have an example for this, not an additional api.

@targos
Copy link
Member

targos commented Feb 21, 2022

Also note that it's quite expensive to track the closest value on big series, so a generic hook that tracks everything could be problematic performance-wise.

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

No branches or pull requests

3 participants