Quantcast
Channel: 🎛️ Dash - Plotly Community Forum
Viewing all articles
Browse latest Browse all 6271

Dash Dropdown - Auto-Validation

$
0
0

Hi Everyone , I had a problem With my Dropdown it’s auto-validate and I can’t choose multiple values here is my code :

`def create_dashboard(server):
dash_app = dash.Dash(server=server,
routes_pathname_prefix=’/dashapp/’,
external_stylesheets=[’/static/dist/css/styles.css’,
https://fonts.googleapis.com/css?family=Lato’]
)

db = pymysql.connect("localhost", "root", "password", "pokemon")
sql_query = pd.read_sql_query("SELECT * FROM pkmn", db)
df = pd.DataFrame(sql_query)


dash_app.index_string = html_layout

dash_app.layout = html.Div(
    children=[dcc.Dropdown(
        id='histogram-graph',
         options=[{'label': i, 'value': i} for i in df['Name']
                  ],
         
         placeholder="Select Pokemon",
         multi=True,
        
    ),

],
    id='dash-container'
)

@dash_app.callback(
                dash.dependencies.Output('dash-container', 'children'),
                [dash.dependencies.Input('histogram-graph', 'value')])`

Did you see an issue?

Thank you for your reply…

3 posts - 3 participants

Read full topic


Viewing all articles
Browse latest Browse all 6271

Latest Images

Trending Articles



Latest Images