forked from rahimrajwani/Search-in-MTB-genomes
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDemo_linechart.php
95 lines (83 loc) · 2.91 KB
/
Demo_linechart.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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
<html>
<head>
<link rel="stylesheet" href="style.css" type="text/css">
<script type="text/javascript" src="https://www.gstatic.com/charts/loader.js"></script>
<script type="text/javascript">
google.charts.load('current', {'packages':['line']});
google.charts.setOnLoadCallback(drawChart);
function drawChart() {
var data = new google.visualization.DataTable();
data.addColumn('string', 'Isolation year');
data.addColumn('number', 'Count');
data.addRows([
["1", 37.8],
["2", 30.9],
["3", 25.4],
]);
var options = {
title: {position: 'none'},
legend: {position: 'none'},
chartArea: {width:'100%',height:'100%'},
width: 500,
height: 500,
axes: {
x: {
0: {side: 'botttom'},
}
},
};
var chart = new google.charts.Line(document.getElementById('line_top_x'));
chart.draw(data, google.charts.Line.convertOptions(options));
}
</script>
<script type="text/javascript">
google.charts.load('current', {'packages':['corechart']});
google.charts.setOnLoadCallback(drawChart);
function drawChart() {
var data = google.visualization.arrayToDataTable([
['Order', 'Amount'],
['Present', parseInt(6)],
['Absent', parseInt(4)]
]);
var options = {
title: {position: 'none'},
legend: {position: 'bottom'},
chartArea: {width:'100%',height:'75%'},
pieHole: 0.4,
width: 150,
height: 100,
};
var chart = new google.visualization.PieChart(document.getElementById('piechart'));
chart.draw(data, options);
}
</script>
<script type="text/javascript">
google.charts.load('current', {
'packages':['geochart'],
// Note: you will need to get a mapsApiKey for your project.
// See: https://developers.google.com/chart/interactive/docs/basic_load_libs#load-settings
'mapsApiKey': 'AIzaSyD-9tSrke72PouQMnMX-a7eZSW0jkFMBWY'
});
google.charts.setOnLoadCallback(drawRegionsMap);
function drawRegionsMap() {
var data = google.visualization.arrayToDataTable([
['Country', 'Popularity'],
['Germany', 10],
['United States', 300],
['Brazil', 15],
['Canada', 20],
['France', 250],
['XYZ', 1000]
]);
var options = {};
var chart = new google.visualization.GeoChart(document.getElementById('regions_div'));
chart.draw(data, options);
}
</script>
</head>
<body>
<!-- <div id="piechart" style="width: 10%;float:right;padding: 2em;"></div>
<div id="line_top_x" style="width: 10%;float:left;padding: 2em;"></div> -->
<div id="regions_div" style="width: 900px; height: 500px;"></div>
</body>
</html>