Dashboards bouwen met Dash en Plotly
Alex Scriven
Data Scientist
Het 'Box Model' ziet elk HTML-element als een doos met lagen:
height & width)
Het CSS-argument border heeft drie onderdelen:
'border':'A B C'solid of dotted)red)
dcc.Graph(figure=ecom_bar,
style={'width':'500px',
'height':'450px',
'border':'5px dotted red'}
)

De ruimte van een HTML-element instellen:
Bijv. 'padding':'10px 5px 5px 15px'
$$

Geen padding:

Met 'padding':'100px':

Geen margin:

Met margin: 100px auto:

Met: 'margin':'100px'

Met: 'margin':'100px auto'

Elementen lijnen niet uit? HTML-elementen zijn 'inline' of '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 bouwen met Dash en Plotly