Dashboards mit Dash und Plotly erstellen
Alex Scriven
Data Scientist
dash.html-Komponenten.H1().Div()<div>
<div style=
"background-color: red;
width:250; height:250;">
</div>
<div style=
"background-color: lightblue;
width:250; height:250;">
<h1>This box</h1>
</div>
</div>
.Br() = Zeilenumbruch.Img() = Bild einfügen
.Ul() \ .Ol() & .Li() = Listen erstellen.Ul() für ungeordnete Liste (Bullets, wie hier).Ol() für geordnete Liste (nummeriert).Li() für jedes Listenelement
app.layout = [html.Img(src='www.website.com/logo.png'), html.H1("Our Sales Dashboard")]

Text setzen und formatieren
.P() oder .Span() = Fließtext einfügen.P() oder .Span()).B() = Text fett.I() = Text kursiv
Etwas komplexere Formatierung:
app.layout = [ html.H1("Our Sales Dashboard"),html.Span(children=[f"Prepared: {datetime.now().date()}"," by ", html.B("Jessie Parker, "),html.I("Data Scientist")])]

$$
app.layout = [
html.H1("Our Sales Dashboard"),
html.Span(children=[
f"Prepared: {datetime.now().date()}",
html.Br(),
" by ", html.B("Jessie Parker, "),
html.Br(),
html.I("Data Scientist")])
]

Dashboards mit Dash und Plotly erstellen