-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathmultiple_charts.html
54 lines (44 loc) · 1.4 KB
/
multiple_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
<!doctype html>
<html>
<head>
<script src="../node_modules/anychart/dist/js/anychart-base.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>
.chart {
width: 400px;
height: 200px;
}
html,
body {
margin: 0;
padding: 0;
}
#bg {
margin: 15px 0 10px 15px;
}
</style>
</head>
<body>
<button id="bg">change backgrounds</button>
<div class="chart"></div>
<div class="chart"></div>
<div class="chart"></div>
<script>
var cnts = $('.chart');
cnts.anychart('column', [3, 1, 2], [5, 3, 6]);
var bg = 'red green blue'.split(' ');
$('#bg').click(function () {
cnts.each(function (index) {
$(this).anychart().background(bg[index] + ' .5');
});
})
</script>
<script
src="https://cdnjs.cloudflare.com/ajax/libs/iframe-resizer/3.6.3/iframeResizer.contentWindow.min.js"></script>
</body>
</html>