Dash と Plotly で作るダッシュボード
Alex Scriven
Data Scientist
「ボックスモデル」は各 HTML 要素を層を持つ箱として扱います:
height と width)
border CSS 引数は3要素を取ります:
'border':'A B C'solid, dotted)red)
dcc.Graph(figure=ecom_bar,
style={'width':'500px',
'height':'450px',
'border':'5px dotted red'}
)

HTML 要素の余白を設定するには:
例: 'padding':'10px 5px 5px 15px'
$$

パディングなし:

'padding':'100px' を追加:

マージンなし:

margin: 100px auto を追加:

'margin':'100px' の場合

'margin':'100px auto' の場合

要素が揃わない場合: HTML 要素は「inline」または「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>
$$

Dash と Plotly で作るダッシュボード