Hi, I’m developing a dashboard and I have different tabs that show different pages. For each page content I’ve created a different .py that specifies the layout, the dataframes and so on. Everything was fine until I tried to make the callback in order to change a graph according to a dropdown selection, because it doesn’t work. I have the corresponding callback inside each document and in app.py I call the layout with
@app.callback(Output(“page-content”, “children”),
Input(“tabs-styled”, “value”))
def render_content(tab):
if tab == “america”:
return america.layout
elif tab == “europe”:
return europe.layout
elif tab == “asia”:
return asia.layout
elif tab == “africa”:
return africa.layout
else:
return america.layout
I don’t get why wouldn’t it work. It doesn’t even show a figure, just the space. I would much appreciate some help.