diff options
| author | Andrew Lee <alee14498@protonmail.com> | 2020-10-12 17:45:52 -0400 |
|---|---|---|
| committer | Andrew Lee <alee14498@protonmail.com> | 2020-10-12 17:45:52 -0400 |
| commit | 422c0a686fe41b4d92826e9704dca039f21918b1 (patch) | |
| tree | 3ff32bc2cd7c378278a3a4fa158cde7c9c025688 /static | |
| parent | 92afa6eade1f7a338415511bebdc7406511e3ca9 (diff) | |
| download | chine-projet-422c0a686fe41b4d92826e9704dca039f21918b1.tar.gz chine-projet-422c0a686fe41b4d92826e9704dca039f21918b1.tar.bz2 chine-projet-422c0a686fe41b4d92826e9704dca039f21918b1.zip | |
Added graph
Diffstat (limited to 'static')
| -rw-r--r-- | static/chart.html | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/static/chart.html b/static/chart.html new file mode 100644 index 0000000..5c44b0c --- /dev/null +++ b/static/chart.html @@ -0,0 +1,41 @@ +<html> + <head> + <script type="text/javascript" src="https://www.gstatic.com/charts/loader.js"></script> + <script type="text/javascript"> + google.charts.load('current', {packages: ['corechart', 'bar']}); + google.charts.setOnLoadCallback(drawBasic); + +function drawBasic() { + + var data = google.visualization.arrayToDataTable([ + ['Pays', 'Population en 2020',], + ['Chine', 1439323776], + ['Inde', 1380004385], + ['États-Unis', 331002651], + ['Indonésie', 273523615], + ['Pakistan', 220892340] + ]); + + var options = { + title: 'Les top 5 pays par population', + chartArea: {width: '50%'}, + hAxis: { + title: 'Population Totale', + minValue: 0 + }, + vAxis: { + title: 'Pays' + } + }; + + var chart = new google.visualization.BarChart(document.getElementById('chart_div')); + + chart.draw(data, options); + } </script> + </head> + <body> + <div id="chart_div" style="width: 900px; height: 500px;"></div> + <p style="color:white;">Propulsé par Google Graph</p> + <p><a href="https://www.worldometers.info/world-population/population-by-country/" style="color:white;">Données fournies par WorldOmeter</a><p/> + </body> +</html> |
