Created
June 24, 2016 17:23
-
-
Save jjvillavicencio/fc3803547b8275d63760e76a2d583ada to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{% extends "index.html" %} | |
{% block header %} | |
<meta name="viewport" content="initial-scale=1.0, user-scalable=no"> | |
<script type="text/javascript" src="https://www.google.com/jsapi"></script> | |
<script type="text/javascript"> | |
google.load("visualization", "1", {packages:["corechart"]}); | |
google.setOnLoadCallback(drawChart); | |
function drawChart() { | |
var data = google.visualization.arrayToDataTable([ | |
['Tareas','Horas por dia'], | |
['Trabajo',8], | |
['Comer',4], | |
['Mirar TV',2], | |
['Carbiarse',2], | |
['Dormir',8] | |
]); | |
var options ={ | |
title: "Mis actividades diarias" | |
}; | |
var chart=new google.visualization.PieChart(document.getElementById('piechart')); | |
chart.draw(data, options); | |
} | |
</script> | |
{% endblock %} | |
{% block main %} | |
<h2>Google Chart</h2> | |
<section id="piechart"></section> | |
{% endblock %} | |
{%block footer%} | |
<h6>Power by @j2villavicencio</h6> | |
{%endblock%} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment