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
import dash
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â)
])
@app.callback(dash.dependencies.Output(âpage-contentâ, âchildrenâ),
[dash.dependencies.Input(âurlâ, âpathnameâ)])
def display_page(pathname):
if pathname == â/apps/KPIâ:
return app1.layout
elif pathname == â/apps/KPI_REPORTINGâ:
return app2.layout
elif pathname == â/apps/KPI_STATSâ:
return app3.layout
else:
return â404â
app.css.append_css({
âexternal_urlâ: âhttps://codepen.io/chriddyp/pen/bWLwgP.cssâ
})
if name == âmainâ:
print(ârunning app âŚâ)
app.run_server(
debug=True,
host=â0.0.0.0â,
port=8050)