I’m trying to insert a scatter plot inside a tab as in the code below however nothing seems to work. I have tried a number of combinations with dash HTML elements, inserting children= etc and I gave up. Could someone explain what I am actually doing wrong, please?
def create_scatterpage():
app.layout = html.Div([([
dcc.Tabs([
dcc.Tab(
px.scatter(
surfacing,
x="Barcode",
y="Machine",
size="Barcode",
color="Category",
hover_name="timeSince",
log_x=False,
log_y=False,
size_max=70,
labels={
"TimeSince": "Average time since last update(min)",
"Machine": "Machine code",
"Category": "Department",
"Barcode": "Number of jobs",
}, title="Surfacing Orders Movement Tracking")
),
dcc.Tab(
px.scatter(
coating,
x="Barcode",
y="Machine",
size="Barcode",
color="Category",
hover_name="timeSince",
log_x=False,
log_y=False,
size_max=70,
labels={
"TimeSince": "Average time since last update(min)",
"Machine": "Machine code",
"Category": "Department",
"Barcode": "Number of jobs",
}, title="Coating Orders Movement Tracking"))])])])
return app.layout