【发布时间】:2020-10-04 01:34:59
【问题描述】:
我正在使用 Dash 创建具有此布局的 Web 仪表板:
app.layout = html.Div([
html.H1("DashBoard Bonos Buenos Aires", style={'text-align': 'center'}),
html.Div(
className='row',
children=[
html.Div([
html.Div([
html.H2("Esquemas", style={'text-align': 'center'}),
dash_table.DataTable(
id='EsquemasBonos',
columns=[{"name": i, "id": i} for i in Gasto.columns],
data=Gasto.to_dict('records'), style_table={'overflowY': 'scroll'})
], style={'height': '300px', 'overflow': 'scroll'}),
html.Div([
html.H2("TablaTotal", style={'text-align': 'center'}),
dash_table.DataTable(
id='TablaTotal',
columns=[{"name": i, "id": i} for i in GastoTotal.columns],
data=GastoTotal.to_dict('records'), style_table={'overflowY': 'scroll'})
]),
html.Br(),
html.Div([
html.H2("Tabla Full", style={'text-align': 'center'}),
dash_table.DataTable(
id='TablaFull',
columns=[{"name": i, "id": i} for i in PorDriverID1.columns],
data=PorDriverID1.to_dict('records2'), style_table={'overflowY': 'scroll'})
], style = {'width': '100%', 'height': '500px', 'overflow': 'scroll'}),
], style={'width': '50%', 'display': 'inline-block'}),
html.Div([
html.H2("Gasto por Esquema", style={'text-align': 'center'}),
dcc.Graph(id='Gasto', figure=fig)
], style={'width': '50%', 'display': 'inline-block',}),
]),
])
我想在屏幕的一半上显示表格,在另一半上显示图表。但由于某种原因,我不明白这是输出。
我希望图表和表格处于同一级别。我已经尝试过使用内联块,但我似乎无法将图形和表格放在同一“行”上。
【问题讨论】:
标签: plotly dashboard plotly-dash