-
Notifications
You must be signed in to change notification settings - Fork 11.9k
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
fix: allow colors as array #10075
fix: allow colors as array #10075
Conversation
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. |
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 |
This reverts commit 632e2ee.
@LeeLenaleee Thank you very much. Updated the PR to make the change under |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Make it more in line with the other lines that do this:
https://github.com/chartjs/Chart.js/blob/master/types/index.esm.d.ts#L2822
https://github.com/chartjs/Chart.js/blob/master/types/index.esm.d.ts#L2859
Co-authored-by: Jacco van den Berg <[email protected]>
@kurkle Thanks! Updated as per your suggestion. |
There are some charts where I need to use different label colors per label.
Using a
string[]
for the labelcolor
seems to work, but TS won't allow it.This PR fixes the types to allow that.