Closed sdementen closed 3 years ago
I ran into this issue too and just came across this post. After some playing around, I figured out you need "fill" instead of "color" in your custom scale styles.
as mentioned by @jdyerrhg, this will be your solution. I have modified some colors
daq.Gauge(
color={"gradient": True, "ranges": {"green": [0, 5], "yellow": [5, 7], "red": [7, 9], "black": [9, 10]}},
value=2,
max=10,
min=0,
scale={
"custom": {
0.14: {"style": {"fill": "red"}, "label": "Hello"},
4.14: {"style": {"fill": "turquoise"}, "label": "Foo"},
4.95: {"style": {"fill": "blue"}, "label": "Baz"},
8.12: {"style": {"fill": "red"}, "label": "Jeez<br>bom"},
}
},
),
I am using a DAQ gauge as following
and I have the issues:
<text x="118.58641410998341" y="64.01665418691996" text-anchor="middle" style="color: red;">Baz</text>
is escaped
If style did work, would it be possible to have the text of the scale outside the gauge instead of inside ?