-
-
Save nfriedli/0f63c5e64c6c7312499c to your computer and use it in GitHub Desktop.
Le template avec Google mais sans random
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
<html> | |
<head> | |
<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([ | |
['Task', 'Trans en retard'], | |
['OK', {{ circule }}], | |
['Retard', {{ retard }}] | |
]); | |
var options = { | |
title: '{{ depart }} > {{ arrive }}' | |
}; | |
var chart = new google.visualization.PieChart(document.getElementById('piechart')); | |
chart.draw(data, options); | |
} | |
</script> | |
</head> | |
<body> | |
<h1>{{ depart }} > {{ arrive }}</h1> | |
<p>Le trajet de {{ depart }} vers {{ arrive }} sur l'axe {{ axe }} prevoit {{ nombre }} trains.</p> | |
<p>{{ circule }} trains sont partis. {{ retard }} etaient en retard.</p> | |
<div id="piechart" style="width: 900px; height: 500px;"></div> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment