-
Notifications
You must be signed in to change notification settings - Fork 0
/
statistik1.php
55 lines (48 loc) · 1.85 KB
/
statistik1.php
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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
<?php
$con = mysqli_connect('localhost','aemk01_skp-dp_sd','q452zp4z','aemk01_skp_dp_sde_dk');
?>
<!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8">
<title>Skostørrelser</title>
<script type="text/javascript" src="https://www.google.com/jsapi"></script>
<script type="text/javascript" src="https://www.gstatic.com/charts/loader.js"></script>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
<script type="text/javascript">
google.load("visualization", "1", {packages:["corechart"]});
google.setOnLoadCallback(drawChart);
function drawChart() {
var data = google.visualization.arrayToDataTable([
['Skostørrelse'],
<?php
$query = "SELECT Skostoerelse from skostoerrelse";
$exec = mysqli_query($con,$query);
while($row = mysqli_fetch_array($exec)){
echo "[".$row['Skostoerelse']."],";
}
?>
]);
var options = {
title: 'Skostørrelser',
pieHole: 0.5,
pieSliceTextStyle: {
color: 'white',
},
legend: 'none'
};
var chart = new google.visualization.Histogram(document.getElementById("columnchart12"));
chart.draw(data,options);
}
</script>
</head>
<body>
<div class="container-fluid">
<div id="columnchart12" style="width: 100%; height: 500px;"></div>
</div>
<center><p><a href="index.php">Start</a></p></center>
<center><p><a href="statistik.php">Numre</a></p></center>
</body>
</html>