-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathcolumn1.html
More file actions
47 lines (41 loc) · 1.46 KB
/
column1.html
File metadata and controls
47 lines (41 loc) · 1.46 KB
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
<html>
<head>
<script type="text/javascript" src="https://www.google.com/jsapi"></script>
<script src="../js/jquery.min.js" type="text/javascript"></script>
<script type="text/javascript">
google.load("visualization", "1", {packages:["corechart"]});
google.setOnLoadCallback(function() {
// Place init code here instead of $(document).ready()
drawChart();
});
function drawChart() {
// Define the chart to be drawn.
var data = new google.visualization.arrayToDataTable
([
['month', 'Mountain Bikes' , 'Road Bikes' , 'Touring Bikes', { role: 'annotation' } ] ,
['January' , 826901.0028 , 1067159.9054 , 0 , ''],
['February' , 847502.6029 , 1114024.3854 , 0 , ''],
['March' , 1077264.5329 , 1800833.2718 , 0 , ''],
['April' , 902992.5195 , 1183349.0160 , 0 , ''],
['May' , 862787.9772 , 1088422.8727 , 550625.8492 , ''],
['June' , 1355023.3887 , 1458572.0983 , 1132492.6258 , '']
]);
// Set chart options
var options = {
title:'Total Sales of First Half Year',
width:828,
height:382,
legend: { position: 'top', maxLines: 3 },
bar: { groupWidth: '75%' },
isStacked: true,
};
// Instantiate and draw the chart.
var chart = new google.visualization.ColumnChart(document.getElementById("container"));
chart.draw(data, options);
}
</script>
</head>
<body>
<div id = "container">
</div>
</body>