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

Better generics for data and events #1380

Open
2 tasks
rshen91 opened this issue Sep 14, 2021 · 0 comments
Open
2 tasks

Better generics for data and events #1380

rshen91 opened this issue Sep 14, 2021 · 0 comments
Labels
code quality discuss To be discussed enhancement New feature or request meta ...meta issue

Comments

@rshen91
Copy link
Contributor

rshen91 commented Sep 14, 2021

Is your feature request related to a problem? Please describe.
Limit the use of unions throughout charts in cases like onBrushEnd.

  • Data - determine what type of chart with just data passed in
  • Events - union event such as in onBrushEnd between XY and Heatmap

Describe the solution you'd like
There can be a generic provided in the Settings component instead of using union types throughout

Additional context
#1369 has some discussion #1369 (comment)
Add any other context or screenshots about the feature request here.

Link to helpful blog post https://wanago.io/2020/03/09/functional-react-components-with-generic-props-in-typescript/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
code quality discuss To be discussed enhancement New feature or request meta ...meta issue
Projects
None yet
Development

No branches or pull requests

1 participant