How to specify the color of lines and bars in XYChart? #5207
-
I looked at the documentation and I can't figure out how to set the color for |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
i think mermaid should auto-pick different web-safe colors for xygraph bars when no theme is specified. This should make diagrams looks better. e.g.: compare with the example here |
Beta Was this translation helpful? Give feedback.
-
Using the Chart Theme Variables you can set a color palette with Here's a short example
A legend is currently not possible, I've suggested the feature in #5326 |
Beta Was this translation helpful? Give feedback.
Using the Chart Theme Variables you can set a color palette with
plotColorPalette
.These colors will be applied to the lines and bars defined in the xyChart. So the first color in your palette will correspond with the first bar/line etc.
Here's a short example