-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdaily_activity_chart.js
More file actions
32 lines (32 loc) · 989 Bytes
/
daily_activity_chart.js
File metadata and controls
32 lines (32 loc) · 989 Bytes
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
// Daily activity line chart
google.charts.load('current', { 'packages': ['corechart'] });
google.charts.setOnLoadCallback(drawChart);
function drawChart() {
var data = google.visualization.arrayToDataTable([
["Day", "$", { role: "style" }],
["Sun", sun, "#c3ff00"],
["Mon", mon, "#cdff2b"],
["Tue", tue, "#d6ff52"],
["Wed", wed, "#ddff70"],
["Thu", thu, "#e4ff8f"],
["Fri", fri, "#ebffab"],
["Sat", sat, "#f2ffc9"]
]);
var options = {
title: "Daily Activity",
width: 650,
height: 350,
hAxis: {
title: "Day"
},
vAxis: {
title: "Funds ($)",
maxValue: 5,
minValue: 1
},
bar: { groupWidth: "75%" },
legend: { position: "none" },
};
var chart = new google.visualization.ColumnChart(document.getElementById("daily_activity"));
chart.draw(data, options);
}