Is it possible to show a blank page in plotly/dash when no dropdown is selected?
Currently this is my output when no dropdown is selected.
This code does give a blank page when no dropdowns are selected. However, when the first value of the pillar dropdown is selected, it will be always be a blank graph.
Since I am using multi=True in my dropdowns, when a second or more values of pillar dropdowns are selected, graphs do appear but not when one single dropdown is selected.
For some weird reason, the first selection is always ignored and only taken into account when there is a second dropdown selection.
@app.callback(
Output(component_id='example-graph', component_property='children'),
[Input(component_id='pillar-choice', component_property='value')],
[State(component_id='example-graph', component_property='children')]
)
def update_graph_0(value_pillar, children):
if not value_pillar:
return []
else:
x = dcc.Graph(id='graph1', style={'display':'inline-block', 'width' :'33%'})
y = dcc.Graph(id='graph2', style={'display':'inline-block', 'width' :'33%'})
z = dcc.Graph(id='graph3', style={'display':'inline-block', 'width' :'33%'})
return x,y,z