I have seen lots of answers but the whole concept of callbacks kind of throws me off (still early in my python journey)
My goal is just to make a graph that add many different indicators at the same time as opposed to separate graphs.
Below is a quick example of the code but it will not return the graph itself, even though the drop down does work and has every label. Is my issue in the input, the output, the id's, etc?
Thanks in Advance!
app = JupyterDash(__name__)
layout_home = html.Div(style={'height':'100vh'},children=html.H2('HOME PAGE'))
layout_page_1 = html.Div([
dcc.Dropdown(id='demo-dropdown', options = [ {"label": "Bitcoin", "value": "ohlcfig"},
{"label": "Ethereum", "value": "fig2"},
{"label": "Dogecoin", "value": "fig3"}] , multi = True),
html.Div(id='dd-output-container')
])
@app.callback(
Output('dd-output-container', 'children'),
Input('demo_dropdown', 'value')
)
def build_graph(value):
if value == 'Bitcoin':
return ohlcfig
elif value == 'Dogecoin':
return fig2
if __name__ == '__main__':
app.run_server(debug=True, port=5000)