You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a CartesianChart that gets new line series assigned based on what a user configures. This works great, the only problem I'm facing is that the series gets new colors on every change.
This is to be expected because I never explicitly set the stroke/point color.
Optimally I'd like to keep it that way and not specify the colors myself.
Instead want to infer the color from the series index / provide a seed if there's some randomness involved:
1st series -> first color
2nd series -> 2nd color
...
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
I have a CartesianChart that gets new line series assigned based on what a user configures. This works great, the only problem I'm facing is that the series gets new colors on every change.
This is to be expected because I never explicitly set the stroke/point color.
Optimally I'd like to keep it that way and not specify the colors myself.
Instead want to infer the color from the series index / provide a seed if there's some randomness involved:
1st series -> first color
2nd series -> 2nd color
...
Is there a recommended way of solving this?
Beta Was this translation helpful? Give feedback.
All reactions