使用 Dash 创建包含多个图表的概览页面

我正在尝试使用 Dash 创建一个概览页面,该页面将包含网格状结构中的多个图形。但是我无法使用我编写的代码来实现它。截至目前,我正在使用稍后将被 dcc.Graph() 组件替换的图像。我希望我的页面看起来像:请建议如何实现它

使用 Dash 创建包含多个图表的概览页面

我当前的代码:

#Initialize the app
app=JupyterDash( external_stylesheets=[dbc.themes.BOOTSTRAP])

#Create layout of app
app.layout=html.Div(children=[
        html.Div(classname='row',style = {'height' : '4%','background-color' : 'grey',"margin-bottom": "75px","margin-top": "50px"},children=[dcc.Tabs(id='Department',value='tab-1',children=[
                                    dcc.Tab(value='tab-11',label='M&R'),dcc.Tab(value='tab-12',label='Tank')]) 
            ]),html.Div(classname='row',children=[
            html.Div(dcc.Tabs(id='Area',value='tab-2',vertical=True,children=[
                dcc.Tab(value='tab-21',label='Tab1'),dcc.Tab(value='tab-22',label='Tab2'),dcc.Tab(value='tab-23',label='Tab3')],classname='six columns')),html.Div(classname='six columns',children=[
            html.Div(classname='row',children=[
                html.Div(children=[
                    html.Img(src=app.get_asset_url('piechart.png'),style={'height':'20%','width':'20%',"margin-left": "75px"}),html.Img(src=app.get_asset_url('lineplot.png'),html.Img(src=app.get_asset_url('barplot.png'),"margin-left": "75px"})
                        
                       ]),]),children=[
                html.Div(children=[
                    html.Img(src=app.get_asset_url('barplot.png'),style={'height':'60%','width':'30%',"margin-left": "75px","margin-top": "10px"})
                        ])      
                    ])
            ])
     ])
])


app.run_server(host='127.0.0.1',debug=True,port=4444)
q474136201 回答:使用 Dash 创建包含多个图表的概览页面

暂时没有好的解决方案,如果你有好的解决方案,请发邮件至:iooj@foxmail.com
本文链接:https://www.f2er.com/19780.html

大家都在问