Announcing Dash Bio 1.0.0 🎉 : a one-stop-shop for bioinformatics and drug development visualizations.

go.Indicator updating using callback

I am trying to update a gauge chart from plotly graph_objects using callback.

fig = go.Figure(go.Indicator(
        domain={'x': [0, 1], 'y': [0, 1]},
        title={'text': "Windspeed in m/s"},
        gauge={'axis': {'range': [None, 60]},
               'steps': [
                    {'range': [0, 20], 'color': "palegreen"},
                    {'range': [20, 40], 'color': "cornsilk"},
                    {'range': [40, 60], 'color': "coral"}],

app.layout = html.Div([

        dcc.Graph(id="gauge-chart", figure=fig))
    ], className='row', style={'textAlign': 'center'})

        output=[Output('gauge-chart', 'value')],
        inputs=[Input('interval-components', 'n_intervals')]
    def update_gauge(n):
        value_out = anVar_1.value
        return [value_out]

However, when running this, it returns:

Hi @Colar

This component can be used in a callback:


Yeah, Ive been using that as a place holder. But don’t really like the look of it :smiley:

I agree, the Plotly gauge looks really nice. Maybe @Emmanuelle can say whether it’s possible to use it with Dash? The only other option I know of is to build your own component.