Dashboards mit Dash und Plotly erstellen
Alex Scriven
Data Scientist
Das „Box Model" betrachtet jedes HTML-Element als Box mit Schichten:
height & width)
Das CSS-Argument border hat drei Teile:
'border':'A B C'solid oder dotted)red)
dcc.Graph(figure=ecom_bar,
style={'width':'500px',
'height':'450px',
'border':'5px dotted red'}
)

So legst du den Abstand eines HTML-Elements fest:
Z. B. 'padding':'10px 5px 5px 15px'
$$

Kein Padding:

Mit 'padding':'100px':

Kein Margin:

Mit margin: 100px auto:

Mit: 'margin':'100px'

Mit: 'margin':'100px auto'

Elemente richten sich nicht aus? HTML-Elemente sind entweder „inline" oder „block".
$$
<div style='width:50px;height:50px;
background-color:blue'></div>
<div style='width:50px;height:50px;
background-color:red
;display:inline-block'></div>
<div style='width:50px;height:50px;
background-color:green;
display:inline-block'></div>
$$

Dashboards mit Dash und Plotly erstellen