-
Notifications
You must be signed in to change notification settings - Fork 3
/
simple_dashboard.html
61 lines (49 loc) · 1.72 KB
/
simple_dashboard.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
<!doctype html>
<html>
<head>
<script src="../node_modules/anychart/dist/js/anychart-base.min.js"></script>
<script src="../node_modules/anychart/dist/js/anychart-pareto.min.js"></script>
<script src="../node_modules/anychart/dist/js/anychart-ui.min.js"></script>
<script src="../node_modules/anychart/dist/js/anychart-exports.min.js"></script>
<script src="../node_modules/jquery/dist/jquery.min.js"></script>
<script src="../dist/anychart-jquery.min.js"></script>
<link rel="stylesheet" href="../node_modules/anychart/dist/css/anychart-ui.min.css" />
<link rel="stylesheet" href="../node_modules/anychart/dist/fonts/css/anychart-font.min.css" />
<style>
html,
body {
margin: 0;
padding: 0;
}
#button {
margin: 15px 0 10px 15px;
}
#container {
width: 800px;
height: 600px;
}
</style>
</head>
<body>
<button id="button">Render another dashboard</button>
<div id="container"></div>
<script>
var cnt = $('#container');
var chart1 = anychart.column([2, 4, 2, 1]);
chart1.bounds(0, 0, '50%', '100%');
var chart2 = anychart.pie([4, 2, 1, 3]);
chart2.bounds('50%', 0, '50%', '100%');
var chart3 = anychart.pareto([4, 7, 9, 10]);
chart3.bounds(0, '50%', '100%', '50%');
var chart4 = anychart.line();
chart4.spline([6, 4, 9, 3]);
chart4.bounds(0, 0, '100%', '50%');
cnt.anychartStage(chart1, chart2);
$('button').click(function () {
cnt.anychartStage(chart3, chart4);
})
</script>
<script
src="https://cdnjs.cloudflare.com/ajax/libs/iframe-resizer/3.6.3/iframeResizer.contentWindow.min.js"></script>
</body>
</html>