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

Typings incorrect for Axis Range min and max settings #9984

Closed
juliankigwana opened this issue Dec 14, 2021 · 0 comments · Fixed by #9985
Closed

Typings incorrect for Axis Range min and max settings #9984

juliankigwana opened this issue Dec 14, 2021 · 0 comments · Fixed by #9985
Labels
type: bug type: types Typescript type changes
Milestone

Comments

@juliankigwana
Copy link

In ChartJs v3.5.1 the Axis Range Settings min and max are advertised as being numbers, when they actually accept both numbers and date strings. See tests:

config.min = '2014-12-29T04:00:00';

Expected Behavior

The types to be defined as number | string;

Current Behavior

Project does not compile unless I had TS workarounds
Screenshot 2021-12-14 at 15 44 35

Possible Solution

Steps to Reproduce

Context

Im trying to use a date string to set the min and max values in a scale.

Environment

  • Chart.js version: ChartJs v3.5.1
  • Browser name and version: Chrome
  • Link to your project:
@juliankigwana juliankigwana changed the title Typings incorrect for min and max on scales Typings incorrect for Axis Range min and max settings Dec 14, 2021
@LeeLenaleee LeeLenaleee added the type: types Typescript type changes label Dec 14, 2021
@LeeLenaleee LeeLenaleee added this to the Version 3.7.0 milestone Dec 14, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug type: types Typescript type changes
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants