plotly / dash

Data Apps & Dashboards for Python. No JavaScript Required.
https://plotly.com/dash
MIT License
20.87k stars 2.01k forks source link

[BUG] dash_daq.gauge errors when changing minimum #1418

Open TheDrEmil opened 3 years ago

TheDrEmil commented 3 years ago

Describe the bug

Here is the link to my forum post regarding this issue. There are also some more infos about the things I tried: https://community.plotly.com/t/dash-daq-gauge-buggy-broken/45250

To summarize: When using dcc.gauge and setting the parameter "min" to something other than 0 (In my case I set it to 1), the errors shown in the forum post are thrown. It is important to note, that the gauge is displayed correctly and works, although with the slight problem, that the marks on the scale are not labeled.

Expected behavior

No Errors should be shown in the browser console

ChrCoello commented 2 years ago

This problem is still existing in dash version: 1.21.0 (plotly 5.3.1). Code

daq.Gauge(
                value=50.0,
                label="Frequency",
                max=51.0,
                min=49.0,
                showCurrentValue=True,
                units="Hz",
                color={
                    "gradient": False,
                    "ranges": {
                        "#FFD700": [49.0, 49.5],
                        "#4ea246": [49.5, 50.5],
                        "#FFD701": [50.5, 51.0],
                    },  # theme["primary"],
                }

Behaviour image