Source

mustachebox / mustachebox / templates / mustachebox / pie_chart.html

Full commit
Yohann Gabory ac8c5f6 

Yohann Gabory 8676f1c 
Yohann Gabory ac8c5f6 
Yohann Gabory 8676f1c 

Yohann Gabory ac8c5f6 
Yohann Gabory 8676f1c 


















Yohann Gabory ac8c5f6 


Yohann Gabory 8676f1c 
Yohann Gabory ac8c5f6 

<html>
  <head>
<script type="text/javascript"
    src="https://www.google.com/jsapi"></script>
<script type="text/javascript" src="{{STATIC_URL}}js/google_base.js"></script>
<script type="text/javascript" src="{{STATIC_URL}}js/pie_serie.js"></script>
<script type="text/javascript">

google.load('visualization', '1.0', {'packages':['corechart']});
google.setOnLoadCallback(configureChart);



function configureChart() {

var data = {% autoescape off %}{{object.data}}{% endautoescape %}
  if(data.elem == undefined){
      data.elem = "pie_chart_div"
  };

  // configure the graph and render it
  var chart = new google.visualization.PieChart(
      document.getElementById(data.elem)
  );
  drawPieChart(chart, data.data, null)
}
</script>
  </head>
  <body>
        <div id="pie_chart_div" style="width: 900px; height: 500px;"></div>

  </body>
</html>