How to change the font size of a value in a Gauge chart

No, actually I don’t use JS, just Dash.
I wonder if this trick could work:

import plotly.graph_objects as go

fig = go.Figure(go.Indicator(
    domain = {'x': [0, 1], 'y': [0, 1]},
    value = 450,
    mode = "gauge+number+delta",
    title = {'yanchor': 'auto',  'y': 0, 'text': "Speed"},
    delta_font_color= 'white',
    delta_increasing_color="white",
    delta_decreasing_color="white",
    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()


This shows the Delta in White and gives space for the Title, but I think that if the Delta is shown Up then the Title will be overlapped with some white number. :woozy_face:

1 Like