I tried to update the children under a tab, but somehow failed with error message:
An object was provided as children
instead of a component, string, or number (or list of those). Check the children property that looks something like:
{
“fill”: “toself”,
“r”: [
1,
2,
3,
4,
5
],
“theta”: [
“a”,
“b”,
“c”,
“d”,
“e”
],
“type”: “scatterpolar”
}
Can anyone help? Thanks in advance!
// Code of the tab content
html.Div(
children=[],
id=“tabs-content-example”,
className=“canvas”,
style={“text-align”: “left”, “margin”: “auto”}),
// Callback code
@app.callback(
Output(“tabs-content-example”, “children”), [Input(“stitching-tabs”, “value”)]
)
def fill_tab(tab):
if tab == “canvas-tab”:
a = go.Scatterpolar(r=[1,2,3,4,5], theta=[‘a’,‘b’,‘c’,‘d’,‘e’], fill=‘toself’)
return [html.Div(a)]
else:
return [html.Div(“sdfnsdjkfbskjdbfkj”)] # This works