I try to change the Knob max value of dash_daq
from dash_daq.Knob import Knob
from dash import Dash, html, Output, Input, callback, dcc
app = Dash(__name__)
app.layout = html.Div([
Knob(
id='knob',
label="Частота вращения ротора ВД",
),
dcc.RadioItems(id='radio', options=['update', 'revert'])
])
@callback(
Output('knob', 'max'),
Input('radio', 'value')
)
def update(value):
print(f"Radio value: {value}")
if value == 'update':
max_value = 50
else:
max_value = 10
return max_value
if __name__ == '__main__':
app.run_server(debug=True)
But the maximum value is not updated. Why?