You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Dash DAQ slider cannot set default value to zero when min is negative #161
Expected behavior:
When value=0, the slider value should be in the middle.
When value=-1, the slider value is in the middle.
When value=1, the slider value is in the middle.
Observed behavior:
When value=0, the slider value is located at the most left (BUG).
When value=-1, the slider value is in the middle.
When value=1, the slider value is in the middle.
Workaround by chainster_mike is to set the value to 0.1. IMHO, this issue should be fixed by Dash DAQ.
Below is our minimal code to reproduce the issue:
importdashfromdashimporthtmlimportdash_daqasdaqapp=dash.Dash(__name__)
app.layout=html.Div([
daq.Slider(
id='my-daq-slider',
min=-100,
max=100,
value=0, #Issuestep=1
),
html.Div(id='slider-output')
], style={'padding':100})
@app.callback(dash.dependencies.Output('slider-output', 'children'), [dash.dependencies.Input('my-daq-slider', 'value')])defupdate_output(value):
return'The slider is currently at {}.'.format(value)
if__name__=='__main__':
app.run_server(debug=True)
Activity
Fixes plotly#131 and plotly#161