Crearea dashboardurilor cu Dash și Plotly
Alex Scriven
Data Scientist
dash.html.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() = Întrerupere de linie.Img() = Inserați o imagine
.Ul() \ .Ol() & .Li() = Creare liste.Ul() pentru listă neordonată (cu puncte, ca aceasta!).Ol() pentru listă ordonată (numerotată).Li() pentru fiecare element al listei
app.layout = [html.Img(src='www.website.com/logo.png'), html.H1("Our Sales Dashboard")]

Setați și formatați conținutul text
.P() sau .Span() = Inserați text simplu.P() sau .Span()).B() = Text îngroșat.I() = Text italic
Formatare complexă:
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")])
]

Crearea dashboardurilor cu Dash și Plotly