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

Strong typings for scales and datasets in options #7791

Merged
merged 1 commit into from Sep 14, 2020
Merged

Strong typings for scales and datasets in options #7791

merged 1 commit into from Sep 14, 2020

Conversation

emmcb
Copy link
Contributor

@emmcb emmcb commented Sep 13, 2020

More work on types.

  • Scales options are now strongly typed if containing the type property, else semi-strongly typed (cartesian options for cartesian charts, radial options for radial charts)
  • Added missing options[type].datasets, also strongly typed
  • More sensible default for data points: Chart will still default to unknown[], but for example Chart<'bubble'> will now default to BubbleDataPoint[]
  • Some refactor for registries

Screenshot, any non-valid property here will fail:

Screenshot_20200913_181850

Copy link
Member

@kurkle kurkle left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@etimberg etimberg merged commit b5853a4 into chartjs:master Sep 14, 2020
@etimberg etimberg added this to the Version 3.0 milestone Sep 14, 2020
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

Successfully merging this pull request may close these issues.

None yet

3 participants