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 |
LeeLenaleee
left a comment
There was a problem hiding this comment.
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 <39033624+LeeLenaleee@users.noreply.github.com>
|
@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 labelcolorseems to work, but TS won't allow it.This PR fixes the types to allow that.