Plotly FigureWidgets doesn't get loaded in kaggle's notebook

Viewed 35

I am trying to create an interactive chart using plotly in Kaggle's notebook. My problem here is when I try to add a FigureWidget in the display it's says Loading widget... but none of the widgets load at all. Below, I have given an example of my problem,

Output without FigureWidget

without FigureWidget

Output with FigureWidget

with Figurewidget

Here is the sample code

g = go.FigureWidget(data = go.Bar(x=[1,2,3,4,5],y=[1,2,3,4,5],name='xyz'),
                    layout = go.Layout(title = dict(text="title"))
                   )
container1 = widgets.HBox(children = [widgets.IntSlider(),widgets.Checkbox()])
widgets.VBox([container1,g])

I don't know what is the problem here. The bar trace works fine alone as a chart but it's not getting loaded in widgets.

Please let me know if I'm missing something. Thank you !

P.S. : I am facing this problem in kaggle's notebook

2 Answers

This seems to be a known bug for the Kaggle Notebooks.

I have found multiple posts within the Kaggle Discussion community.

For example this post 3 years ago. As well as this one just 2 years ago.

I totally see the pain in this, but apparently the Kaggle staff doesn't have this bug on the list for high priority bugs.

Hope this will change in the near future!

Finally, I was able to find a solution for this bug with an help from APollner. I had to ask in kaggle discussion. Here is the solution. Hope this helps future coders!

Related