I wanted to check here first before making an issue on Github.
When using a df with the RangeSlider component. I get weird behavior on the slider and a None value as the Output.
import dash
import dash_core_components as dcc
import dash_html_components as html
from dash.dependencies import Input, Output
import plotly.graph_objs as go
import pandas as pd
app = dash.Dash()
df = pd.DataFrame([-2,-1,0,1,2,3,4,5,6])
app.layout = html.Div([
html.Div([
dcc.RangeSlider(
id='slider',
min=df.min(),
max=df.max(),
value=[-1, 4],
step=None,
marks={str(i):i for i in df[0].unique()}
)
],style={'width': '50%', 'margin-top':50, 'margin-bottom':50}
),
html.Div(id='slider-output', style={'margin-top': 20})
])
@app.callback(
Output('slider-output', 'children'),
[Input('slider', 'value')])
def multiply(value):
return 'You have selected "{}"'.format(value)
if __name__ == '__main__':
app.run_server(debug=True)
Is there another way to approach this using dataframes?
Thanks