How do I color specific bars in XY Chart? #5491
Unanswered
LizThompson93
asked this question in
Q&A
Replies: 2 comments
-
The colors your assign using the It's not optimal, but a solution to this use case would be this: ---
config:
xyChart:
width: 500
height: 500
chartOrientation: horizontal
themeVariables:
xyChart:
titleColor: "#ff0000"
plotColorPalette: "#ff0000, #434455"
---
xychart-beta
title "Sales Revenue"
x-axis ["A", "B", "C", "D"]
y-axis "Revenue (in $)" 0 --> 100
bar [16.0, 21.8, 71.5, 8.3]
bar [0, 21.8, 71.5, 8.3]
|
Beta Was this translation helpful? Give feedback.
0 replies
-
I suspect you don't need this anymore but maybe somebody else stumbles across this. There are two ways of doing it:
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Documentation: https://mermaid.js.org/syntax/xyChart.html#chart-theme-variables
Expectation: Specifically make the first bar red, and the other three bars dark gray.
Current: It applies the first color to all bars.
Am I using plotColorPalette wrong? It only applies the first color in the list to all bar instead of the first bar.
Beta Was this translation helpful? Give feedback.
All reactions