title: Unable to properly update Flot graph on ajax response
body: <p>I have a graph that is properly generated when the page loads. That code is:</p>
  
  <pre><code>&lt;body&gt;
  &lt;div id="placeholder" style="width:800px;height:400px;"&gt;&lt;/div&gt;
  
  &lt;script type="text/javascript"&gt;
  $(function () {
      $.plot($("#placeholder"),
  [ { data: %s } ],
  { xaxes: [ { mode: 'time' } ],
    yaxes: [  ] })
  });
  &lt;/script&gt;
  </code></pre>
  
  <p>Which works fine. I have a button that executes jquery and makes a request to get a new json data structure. I've validated that the json being returned is indeed proper json. I'm attempting to graph the result with:</p>
  
  <pre><code>&lt;script type="text/javascript"&gt;
  $(function() {
        $("#button").click( function()
             {
               //alert('button clicked');
               $.ajax({
                  url:  '/graph',
                  type: 'POST', 
                  dataType: 'html',
                  data: {
                      start_date: $('#start_date').val(),
                      end_date  : $('#end_date').val(),
                      ticker    : $('#ticker').val()
                  },
                  success: function(result) {
                  var placeholder = $("#placeholder");
                  $.plot(placeholder,
                    [ { data: result } ], 
                      { xaxes: [ { mode: 'time' } ],
                        yaxes: [  ] });  
               }
              });
            }
        );
  });
  </code></pre>
  
  <p>Which redraws the graph, but it's empty and the y-axes is the default -1.0 through 1.0 and the x-axes is a single time entry of 00:00:00. </p>
  
  <p>I've tried to use the setData() and draw() method calls but they don't fix the issue.</p>
  
  <p>There are no javascript errors being thrown as shown by firebug. 
  So, what am I doing wrong?</p>
  
  <p>TIA!
      </p>