0

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.

sentence
  • 8,213
  • 4
  • 31
  • 40
wael
  • 11

1 Answers1

0

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

Yashvi
  • 45
  • 7