-
Notifications
You must be signed in to change notification settings - Fork 0
/
dounutHistory.php
29 lines (26 loc) · 956 Bytes
/
dounutHistory.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
<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"]});
google.charts.setOnLoadCallback(drawChart);
function drawChart() {
var data = google.visualization.arrayToDataTable([
['Activity', 'Activities per month'],
['submissions', <?php echo "$submissions[0]"; ?>],
['Improvements', <?php echo "$improvements[0]"; ?>],
['Comments', <?php echo "$comments[0]"; ?>]
]);
var options = {
title: 'My Monthly Activities',
pieHole: 0.4,
};
var chart = new google.visualization.PieChart(document.getElementById('donutchart'));
chart.draw(data, options);
}
</script>
</head>
<body>
<div id="donutchart" style="width: 800px; height: 400px;"></div>
</body>
</html>