I am trying to display pie chart inside html div as below:
html.Div([
go.Figure(data=Piedata)
])
I got an error:
“An object was provided as children instead of a component, string, or number (or list of those). Check the children property”
If I try to display the same chart in a separate file using .show()
it works, but when I try to display it in the app.py file with another html.div
components I got this error.
Use dcc.Graph(figure=your_figure_name) instead
html.Div([
dcc.Graph(figure=your_figure_name)
])
Look at https://dash.plotly.com/dash-core-components/graph for more details about its documentation
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.