Skip to content

Conversation

@LovelyAndy
Copy link
Contributor

There are some charts where I need to use different label colors per label.
Using a string[] for the label color seems to work, but TS won't allow it.
This PR fixes the types to allow that.

@etimberg
Copy link
Member

Where specifically are you passing the colors as an array? I don't think all spots that accept colours accept arrays of colours, so I'm not sure this change is the correct one to make.

@etimberg etimberg added the type: types Typescript type changes label Jan 15, 2022
@LeeLenaleee
Copy link
Collaborator

LeeLenaleee commented Jan 15, 2022

This will break some parts since in the typing some things are defined as an array of collors like here: https://github.com/chartjs/Chart.js/blob/master/types/index.esm.d.ts#L2822

Which will make a double array valid which isn't supported

@LovelyAndy
Copy link
Contributor Author

@LeeLenaleee Thank you very much. Updated the PR to make the change under TickOptions!

Copy link
Collaborator

@LeeLenaleee LeeLenaleee left a comment

Choose a reason for hiding this comment

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

@kurkle kurkle added this to the Version 3.7.1 milestone Jan 16, 2022
Co-authored-by: Jacco van den Berg <[email protected]>
@LovelyAndy
Copy link
Contributor Author

@kurkle Thanks! Updated as per your suggestion.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type: types Typescript type changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants