Created
October 6, 2022 21:12
-
-
Save ant358/927665e2d93eaea9767f9eaec3749188 to your computer and use it in GitHub Desktop.
The Dash gauge for Jupyter Dash dashboard
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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