Closed wbrgss closed 3 years ago
can confirm!
Colors also don't align with the range-values if min is not equal to zero. In the following example I would expect the green area to be around the gauge needle at 22. Missing labels due to the known bug.
daq.Gauge(
color={"gradient":True ,"ranges":{"#ff0001": [16, 20], "FFFF00":[20, 21], "green": [21, 22], "yellow" : [22,26], "#FF0000": [26,30] }},
value=22,
label='Default',
scale={'interval': 2, 'labelInterval': 2},
max=30,
min=16,
)
Odd behaviour. Unfortunately, it renders gauges pretty useless for me.
Colors also don't align with the range-values if min is not equal to zero. In the following example I would expect the green area to be around the gauge needle at 22. Missing labels due to the known bug.
daq.Gauge( color={"gradient":True ,"ranges":{"#ff0001": [16, 20], "FFFF00":[20, 21], "green": [21, 22], "yellow" : [22,26], "#FF0000": [26,30] }}, value=22, label='Default', scale={'interval': 2, 'labelInterval': 2}, max=30, min=16, )
Hey @Yakult182, In your code, you have actually not added 2nd color property properly. I am working on this bug fix and was using your code but the color behavior was working correctly. I am adding a GIF that has the issue corrected. will create a PR soon as the original bug is resolved as well.
I think the labels should be displayed, with the interval count simply starting at
min
as I think is implied by thescale
prop description/docstrings (see "Gauge properties"). Thescale
arguments (e.g.labelInterval
) appear to be directly related to the label display.Providing a non-
0
(EDIT: positive) max value does not affect the interval label display, which is inconsistent IMO.With a non-
0
min
(EDIT: positive) argument — no interval labels:When the
min
value is0
, either implicitly (by default) or explicitly withmin=0
:Minimal example: