fig = go.Figure()
fig.add_trace(go.Indicator(
mode = "number+gauge+delta",
gauge = {'axis': {'range': [None, 100], 'tickwidth': 1, 'tickcolor': "white"},
'bar': {'color': "#0051a5"},
'threshold': {
'line': {'color': "purple", 'width': 4},
'thickness': 0.75,
'value': b_score},
'steps':colors
},
delta = {'reference': b_score, 'increasing': inccolor, 'decreasing':deccolor},
value = p_score,
))
Is there a way to show a legend for the color scheme in steps?
colors = [
{'range': [0, 25], 'color': '#ff8080'}, # Assuming Low
{'range': [25, 50], 'color': '#ffff66'}, #Assuming Medium
{'range': [50, 100], 'color': '#66ff33'}, #Assuming High
]