Displaying Plotly Graph Objects (go.Figure) in Dash Bootstrap Components

HI @iacisme, I think you are mixing up the dash component dcc.Graph() and plotly.graph_objects.

What you are seeing in the image you posted is just some dash components dcc.Graph() without a figure object, i.e dcc.Graph(figure={}).

As for the figure object, you can use plotly.express or plotly.graph_objects. Under the hood, plotly.express uses plotly.graph_objetcs so technically there is no difference.

An example:

import dash
from dash import dcc
import dash_bootstrap_components as dbc
import plotly.graph_objects as go
import plotly.express as px

app = dash.Dash(__name__)

app.layout = dbc.Container(
    [
        dbc.Card(
            dcc.Graph(
                id='decisionBoundary_go',
                figure=go.Figure(go.Scatter(x=[1, 2], y=[1, 2]))
            )
        ),
        dbc.Card(
            dcc.Graph(
                id='decisionBoundary_px',
                figure=px.line(x=[1, 2], y=[1, 2])
            )
        )
    ]
)

if __name__ == "__main__":
    app.run_server(debug=True)

You could even use a different graphicing packacke for the figures, such als altair.