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

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

    {% block create_chart %}
    var chart = new google.visualization.ColumnChart(document.getElementById('{{ chart.get_html_id }}'));
    {% endblock %}
    chart.draw(data, options);
    chart{{ chart.get_html_id }} = chart;
  }
</script>

<div id="{{ chart.get_html_id }}" style="width: {{ chart.width }}px; height: {{ chart.height }}px;"></div>

