I followed the example by creating the following structure, to create multiple dashboards each one implemented within app.* but it does not seem to show the graphs (the links do work and the layout seems to be right) however the @app.callback do not seem to be executed to refresh graphs based on the input in from - to date control (using my-date-picker-range component).
from dash.dependencies import Input, Output
import dash_core_components as dcc
import dash_html_components as html
from app import app
from apps.KPI import app as app1
from apps.KPI_REPORTING import app as app2
from apps.KPI_STATS import app as app3
app = dash.Dash()
app.layout = html.Div([
dcc.Location(id=‘url’, refresh = False),
html.Div(id = ‘page-content’)
if pathname == ‘/apps/KPI’:
elif pathname == ‘/apps/KPI_REPORTING’:
elif pathname == ‘/apps/KPI_STATS’:
if name == ‘main’:
print(‘running app …’)
Hey there, welcome to the Dash community Would you be able to post a minimal example of code that has the problem?
Hey! I am actually struggling with the same issue. Do you have multiple callbacks per app? Currently working on a team where there are several people making visualizations and the one causing the issue has more 3+ callbacks. If there’s a similarity there, we might’ve narrowed down part of the problem…
Could you simplify your example and share the code? i.e. can you create an example that minimally displays the issue?
Hi, @chriddyp! Thanks so much for looking into this. It was funny, because as I was typing this response to you, I was able to figure it out.
Here was the issue: Since I was taking dashboards from my coworkers, I was incorporating them as is into the server I made to handle multiple dashboards (using the great example you gave here, actually).
Except—and I’m “facepalming” now—of course each of those individual dashboards were set up to run independently with their own servers before being sent to me. I needed to incorporate them into the
app.py file from that multiple dashboards example, and eliminate the old
app references in the individual dashboard files. Doh!
I hope this rather silly revelation makes sense.