-
Notifications
You must be signed in to change notification settings - Fork 37
Expand file tree
/
Copy pathhighcharts_dot_csv.html
More file actions
83 lines (71 loc) · 1.99 KB
/
highcharts_dot_csv.html
File metadata and controls
83 lines (71 loc) · 1.99 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
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
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Highcharts Example DotPlot</title>
<script type="text/javascript" src="https://code.jquery.com/jquery-1.9.1.min.js"></script>
<script type="text/javascript" src="https://code.highcharts.com/highcharts.js"></script>
<script type="text/javascript" src="https://code.highcharts.com/modules/data.js"></script>
<script type="text/javascript">
// Note: this is the jquery method of loading a file!
$.get('data/water_improvement_data.csv', function(data) {
$('#container').highcharts({
data: {
csv: data
},
chart: {
type: 'area',
inverted: true
},
title: {
text: 'Change in Access to Safe Water '
},
subtitle: {
style: {
position: 'absolute',
right: '0px',
bottom: '10px'
},
text: 'source: UNICEF Data'
},
legend: {
layout: 'horizontal',
align: 'right',
verticalAlign: 'top',
x: -50,
y: 50,
floating: true,
borderWidth: 1,
backgroundColor: (Highcharts.theme && Highcharts.theme.legendBackgroundColor) || '#FFFFFF'
},
xAxis: {
},
yAxis: {
title: {
text: '% Improved Access to Safe Water'
},
labels: {
formatter: function () {
return this.Region;
}
},
min: 0
},
plotOptions: {
area: {
fillOpacity: 0.01
},
series: {
lineWidth: 0,
marker: {
symbol: 'circle'
}
}
}
});
});
</script>
</head>
<body>
<div id="container" style="min-width: 500px; height: 600px; margin: 0 auto"></div>
</body>
</html>