3

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

msuchy
  • 5,162
  • 1
  • 14
  • 26
Niko
  • 69
  • 7
  • 1
    Hi @Niloloza, where is the value stored? It seems to me you should use [dash](https://plotly.com/dash/) in this case – rpanai Jul 07 '20 at 17:58
  • Hi @rpanai , as you see the initial value is 450. I think there must be a way to access this value and change it. I use dash in this case. – Niko Jul 07 '20 at 18:06

0 Answers0