
<script type="text/javascript">
  google.setOnLoadCallback(drawChart{{ chart.get_html_id }});
  function drawChart{{ chart.get_html_id }}() {
    {% block chart_specific_arraytodatatable %}
      var data = google.visualization.arrayToDataTable({{ chart.get_data_json|safe }});
    {% endblock %}

    {% if chart.get_options_json %}
      var options = {{ chart.get_options_json|safe }}
    {% else %}
      var options = {};
    {% endif %}

    {% block create_chart %}
    {% endblock %}
    chart.draw(data, options);
    chart{{ chart.get_html_id }} = chart;
  }
</script>
