Skip to content

Gauge - Incorrect value displayed if value outside range of gauge  #113

Closed

Description

@henrykeithturner

Hi all,

I've noticed that if the value plotted on daq.gauge exceeds the max or min value of the gauge, then the value displayed also sets to being equal to the max or min value, rather than displaying the actual value. This can be misleading when extreme instances occur. I've attached an example below, where the values are set outside the limits, causing incorrect numbers to be displayed.

I was also wondering if it would be better for the pointer to point slightly beyond the limits of the gauge in this case, to indicate the value has gone beyond the limit.

Thanks!

import dash
import dash_daq as daq
import dash_html_components as html

app = dash.Dash(__name__)

app.layout = html.Div([
    daq.Gauge(
        label="Value is greater than max limit",
        min=0,
        max=10,
        value=15,
        showCurrentValue=True,
    ),
    daq.Gauge(
        label="Value is lower than min limit",
        min=0,
        max=10,
        value=-5,
        showCurrentValue=True,
    ),
])


if __name__ == '__main__':
    app.run_server(debug=True)

image

Activity

  1. added a commit that references this issue on Sep 7, 2021
    d002274
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions