I am using plotly for plotting my graphs . I am using the below code for resizing my plotly graph , when I resize my browser window.
$(window).resize(function() {
var divheight = $("#section").height();
var divwidth = $("#section").width();
var update = {
width:divwidth, // or any new width
height:divheight // " "
};
Plotly.relayout('section', update);
}).resize()`
However I am getting the following error in the console when I try to run the code .
plotly-basic.js:17 Uncaught bad container
PS: I am using flask for backend and Javascript , HTML for displaying the plotly plots . I am new to plotly
Can someone please help me out