Hello, trying to do the gauge chart using plotly in python. Using the following code as example, I like to replace the number with “SLOW” if <50, “Moderate” if >50 and <100, “Fast” if >100.
Instead of showing “450”, I like to replace the number with “FAST”. How can replace the number label with text? Thanks.
fig = go.Figure(go.Indicator(
domain = {‘x’: [0, 1], ‘y’: [0, 1]},
value = 450,
mode = “gauge+number”,
title = {‘text’: “Speed”},
delta = {‘reference’: 380},
gauge = {‘axis’: {‘range’: [None, 500]},
‘steps’ : [
{‘range’: [0, 250], ‘color’: “lightgray”},
{‘range’: [250, 400], ‘color’: “gray”}],
‘threshold’ : {‘line’: {‘color’: “red”, ‘width’: 4}, ‘thickness’: 0.75, ‘value’: 490}}))fig.show()