I have a gauge plot that I have produced using the following code. Is it possible to hide the value 74 shown, but still use it as the driver of the bar on the gauge? I want to actually use a text string to "categorize", like a grade. Thus 74 would be a C and I would actually want to show a C. Any suggestions?
score = 74
if round_score in range(0, 60):
bar_color = '#972735'
elif round_score in range(59, 71):
bar_color = '#E46138'
elif round_score in range(70, 81):
bar_color = '#232B37'
elif round_score in range(80, 91):
bar_color = '#00498D'
elif round_score in range(90, 101):
bar_color = '#036048'
else:
bar_color = '#596987'
fig = go.Figure(go.Indicator(
mode = "gauge+number",
value = round_score,
domain = {'x': [0, 1], 'y': [0, 1]},
title = {'text': "<b>Score</b>"},
gauge = {
'axis': {'range': [0,100]},
#{'visible':False},
'bar':{'color': bar_color},
'bgcolor': 'white'
}))