title: How to use offline Plotly and Pyramid to update a plot without reloading the webpage?
body: <p>I am trying to reload an offline Plotly graph based on some user selection on a webpage. I am using Pyramid to generate the webpage. When the user input has been captured, I use the following jQuery to generate content for a div:</p>
  
  <pre><code>$.getJSON("{{ request.route_url('park_list') }}" + "feature_plot/feature_ids=" + ids_string, function(data) {
      document.getElementById("plotly").innerHTML = data.result;
  });
  </code></pre>
  
  <p>The first parameter of the getJSON is based on Jinja2 templating, where a url is retrieved. The output from there is a json dictionary with a "result" key/value pair. The value is the div content, i.e. a Plotly graph. This I then attempt to insert into a div container called "plotly".</p>
  
  <p>The problem is that nothing is inserted. I see an empty block of width 0 and if I try to fix the width, this is successful, but there is still no visible content.</p>
  
  <p>My question is: What is the proper way to dynamically update an offline Plotly, without reloading the page?</p>