-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathindex_charts.html
68 lines (52 loc) · 1.49 KB
/
index_charts.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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Title</title>
</head>
<body>
<div id="id_prueba"></div>
<script type="application/javascript">
(function(f, b) {
var CHARTS;
var c = f.createElement(b),
e = f.getElementsByTagName(b)[0];
c.src = "https://cdn.dev.lacnic.net/require.js";
c.type = "text/javascript";
e.parentNode.insertBefore(c, e);
c.onload = c.onreadystatechange = function() {
// Require libraries loaded
requirejs.config({
"paths": {
"charts": "charts",
"jsapi": "https://www.gstatic.com/charts/loader",
"jquery": "https://cdn.dev.lacnic.net/jquery-1.11.1.min"
}
});
if (typeof google != 'undefined' && typeof google.charts != 'undefined') {
require(["charts", "jquery"], function(ASYNC_CHARTS, $) {
onLoad(ASYNC_CHARTS);
});
} else {
require(["charts", "jquery", "jsapi"], function(ASYNC_CHARTS, $) {
onLoad(ASYNC_CHARTS);
});
}
var onLoad = function(ASYNC_CHARTS) {
CHARTS = ASYNC_CHARTS;
CHARTS.draw({
x: [1, 2, 3, 4, 5],
ys: [
[1, 2, 3, 4, 5]
],
labels: ['eje'],
kind: 'ColumnChart',
divId: 'id_prueba',
colors: ['yellow']
});
}
}
}(document, "script"));
</script>
</body>
</html>