Skip to content

Better generics for data and events #1380

Open

Description

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

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions