title: Highcharts error #13 while instantiating highchart on ajax call
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://stackoverflow.com/questions/11486553/highcharts-uncaught-exception">HighCharts uncaught exception</a>  </p>
  </blockquote>
  
  
  
  <p>I'm trying to instantiate a highcharts objects with this code:</p>
  
  <pre><code>$(function () {
      var chart;
      var json = null;
      $.getJSON('{%  url ajax_search 'pie_chart'  %}?{{request.META.QUERY_STRING}}',
               function(data, textStatus, jqXHR)
              {
                  json = data.template;
                              console.log(json);
                  chart = new Highcharts.Chart(json);
              });
  })
  </code></pre>
  
  <p>The console logs the returned json appropriately.</p>
  
  <p>When I copy and past in the json to where the (json) is, the chart renders. However, as it is now, it throws the following error:  Uncaught Highcharts error #13: www.highcharts.com/errors/13 </p>
  
  <p>Following that link it says:</p>
  
  <blockquote>
    <p>This error occurs if the chart.renderTo option is misconfugured so
    that Highcharts is unable to find the HTML element to render the chart
    in</p>
  </blockquote>
  
  <p>However, again, if I copy and past the json (from the console) to where the variable would otherwise be, it works fine.</p>
  
  <p>I'm sure this is something simple. What am I doing wrong here?</p>