I am trying to use the daq slider for value between -100% to +100% with a default set at 0. However, when I do that, it will display the minimum value instead.
Here is the code:
import dash
from dash.dependencies import Input, Output
import dash_html_components as html
import dash_core_components as dcc
import dash_daq as daq
external_stylesheets = ['https://codepen.io/chriddyp/pen/bWLwgP.css']
app = dash.Dash(__name__, external_stylesheets=external_stylesheets)
app.layout = html.Div([
daq.Slider(
id = 'my-daq-slider',
min=-100,
max=100,
value=0,
handleLabel={"showCurrentValue": True,"label": "%"},
step=1
),
html.Div(id='slider-output')
], style={'padding':100})
@app.callback(
dash.dependencies.Output('slider-output', 'children'),
[dash.dependencies.Input('my-daq-slider', 'value')])
def update_output(value):
return 'The slider is currently at {}.'.format(value)
if __name__ == '__main__':
app.run_server(debug=True)
And here is a screenshot of the result:
My work around now is to set the value=0.1 instead, but this is not ideal. Are there any fix to this. I am using version 0.1.0 of DAQ. Thanks in advance for any help.