Skip to content

Typings: Consider Generics for Chart types #1718

@kum-deepak

Description

@kum-deepak

After working for a few days on adding types, I have started to appreciate the philosophy behind d3 typings. Based on my improved understanding, I feel that we may add two generic type parameters into charts - representing output types of key and value accessors. While going through the code and usage patterns we can determine that only few combinations are valid for each chart type.

For example, a PieChart would expect keys to be string and values to be number. @gordonwoodhull your experience will help in making a comprehensive list of types each of the charts would support. I will start creating this list as a new issue for better tracking.

Most of the other accessors are easier to figure out - for example, title, label, radius, would support only one type.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions