-
Notifications
You must be signed in to change notification settings - Fork 37
/
Copy pathexample.html
112 lines (100 loc) · 2.96 KB
/
example.html
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
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
<html>
<head>
<title>Highcharts Client-Side Export module</title>
<meta charset="UTF-8">
<link rel="stylesheet" type="text/css" href="bower_components/bootstrap/dist/css/bootstrap.min.css" />
<link rel="stylesheet" type="text/css" href="bower_components/bootstrap/dist/css/bootstrap-theme.min.css" />
</head>
<body>
<div class="container">
<h1>Highcharts Client-Side Export module</h1>
<h2>Support</h2>
<p>Here's a list of the current format your browser supports.</p>
<dl class="browser-support dl-horizontal">
<dt>SVG</dt>
<dd data-type="image/svg+xml"></dd>
<dt>PNG</dt>
<dd data-type="image/png"></dd>
<dt>JPEG</dt>
<dd data-type="image/jpeg"></dd>
<dt>PDF</dt>
<dd data-type="application/pdf"></dd>
<dt>CSV</dt>
<dd data-type="text/csv"></dd>
<dt>XLS</dt>
<dd data-type="application/vnd.ms-excel"></dd>
</dl>
<h2>Example</h2>
<div class="highcharts-container" id="example-1"></div>
<script src="bower_components/jquery/dist/jquery.min.js"></script>
<script src="bower_components/highcharts/highcharts.js"></script>
<script src="bower_components/highcharts/modules/exporting.js"></script>
<script src="bower_components/highcharts/modules/canvas-tools.js"></script>
<script src="bower_components/export-csv/export-csv.js"></script>
<script src="bower_components/jspdf/dist/jspdf.min.js"></script>
<script src="highcharts-export-clientside.js"></script>
<script>
$(".browser-support *[data-type]").each(function() {
var jThis = $(this);
if(Highcharts.exporting.supports(jThis.data("type"))) {
jThis.addClass("text-success");
jThis.html('<span class="glyphicon glyphicon-ok"></span>');
}
else {
jThis.addClass("text-danger");
jThis.html('<span class="glyphicon glyphicon-remove"></span>');
}
});
</script>
<script>
$('#example-1').highcharts({
title: {
text: 'Monthly Average Temperature',
x: -20 //center
},
subtitle: {
text: 'Source: WorldClimate.com',
x: -20
},
xAxis: {
categories: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun',
'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'
]
},
yAxis: {
title: {
text: 'Temperature (°C)'
},
plotLines: [{
value: 0,
width: 1,
color: '#808080'
}]
},
tooltip: {
valueSuffix: '°C'
},
legend: {
layout: 'vertical',
align: 'right',
verticalAlign: 'middle',
borderWidth: 0
},
series: [{
name: 'Tokyo',
data: [7.0, 6.9, 9.5, 14.5, 18.2, 21.5, 25.2, 26.5, 23.3, 18.3, 13.9, 9.6]
}, {
name: 'New York',
data: [-0.2, 0.8, 5.7, 11.3, 17.0, 22.0, 24.8, 24.1, 20.1, 14.1, 8.6, 2.5]
}, {
name: 'Berlin',
data: [-0.9, 0.6, 3.5, 8.4, 13.5, 17.0, 18.6, 17.9, 14.3, 9.0, 3.9, 1.0]
}, {
name: 'London',
data: [3.9, 4.2, 5.7, 8.5, 11.9, 15.2, 17.0, 16.6, 14.2, 10.3, 6.6, 4.8]
}]
});
</script>
</div>
</body>
</html>