-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathbubble.html
More file actions
49 lines (43 loc) · 1.51 KB
/
bubble.html
File metadata and controls
49 lines (43 loc) · 1.51 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
48
49
<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
([
['Category', 'Sales Volume', 'Total Sales(USD)', 'Year', 'Rate'],
['Bikes', 37753, 36277074.8522, '2013', 0.831],
['Bikes', 27908, 27911204.0044, '2012', 0.860],
['Components', 24707, 5613602.4970, '2013', 0.129],
['Components', 15107, 3880757.9530, '2012', 0.120],
['Clothing', 37179, 1067665.2085, '2013', 0.024],
['Clothing', 19228, 555587.7060, '2012', 0.017],
['Accessories', 32153, 675054.6510, '2013', 0.015],
['Accessories', 5750, 102439.8207, '2012', 0.003]
]);
// Set chart options
var options = {
title:'Sales Report (2013 VS. 2012)',
width:828,
height:382,
hAxis: {title: 'Sales Volume'},
vAxis: {title: 'Total Sales(USD)'},
bubble: {textStyle: {fontSize: 11}}
};
// Instantiate and draw the chart.
var chart = new google.visualization.BubbleChart(document.getElementById("container"));
chart.draw(data, options);
}
</script>
</head>
<body>
<div id = "container">
</div>
</body>