aboutsummaryrefslogtreecommitdiff
path: root/static/chart.html
blob: 5c44b0cd25c1209a19f15fc20c1ca5a2a625870f (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
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>