1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
  2. Anuncie Aqui
    Anuncie aqui você Também: fdantas@4each.com.br

[Python] Dash bootstrap grid not working: columns not showing

Discussão em 'Python' iniciado por Stack, Julho 14, 2025.

  1. Stack

    Stack Membro Participativo

    I am trying to build a dashboard using plotly-dash and bootstrap for python. Now I am trying to format the dashboard such that i have two columns with the input on the left and the graph on the right. I am however not getting two columns. Below is a code example which should produce two columns, but doesn't (moste likely my mistake though). I've tried to simplify the code as much as possible but it's still not working.

    import dash
    import dash_html_components as html
    import dash_bootstrap_components as dbc

    app = dash.Dash(external_stylesheets=[dbc.themes.DARKLY])
    row = html.Div([
    dbc.Container(
    [
    dbc.Row(dbc.Col(html.Div("A single column"))),
    dbc.Row(
    [
    dbc.Col(html.Div("One of two columns")),
    dbc.Col(html.Div("One of two columns")),
    ]
    ),
    ]
    )
    ])

    app.layout = row



    Returns the following;

    [​IMG]

    The html code is the following; [​IMG]

    Console error/issue; [​IMG]

    Continue reading...

Compartilhe esta Página