Skip to content

Instantly share code, notes, and snippets.

@ant358
Created October 6, 2022 21:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ant358/927665e2d93eaea9767f9eaec3749188 to your computer and use it in GitHub Desktop.
Save ant358/927665e2d93eaea9767f9eaec3749188 to your computer and use it in GitHub Desktop.
The Dash gauge for Jupyter Dash dashboard
# the gauge
gauge = [daq.Gauge(
id='agile-gauge',
# make a colour gradient on the scale
color={"gradient":True,
"ranges":{"green":[0,33],
"yellow":[33,66],
"red":[66,100]}},
# create a custom scale
scale={"custom": {
0: {"label": "Agile",
'style': {'font-size' : 'large'}},
100: {"label" : "Not Agile!",
'style': {'font-size' : 'large'}}
},
},
# label the units
label={
"label": "% Value Delivery Burden",
"style": {"font-size" : "large"}
},
labelPosition="bottom",
# start the needle in the middle
value=50,
min=0,
max=100,
showCurrentValue=True,
units=None,
# set the size in pixels
size=300,
),
]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment