Update plotly gauge chart value dynamically (Python)

Viewed 1823

I need to update a value of plotly gauge chart in python. Here is my source code:

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={'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()

How can I access to value and change it and display every time, if the value chages?

enter image description here

0 Answers
Related