Skip to content

Better generics for data and events #1380

@rshen91

Description

@rshen91

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/

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions