-
Notifications
You must be signed in to change notification settings - Fork 3
/
simple_chart_update.html
54 lines (45 loc) · 1.44 KB
/
simple_chart_update.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>
html,
body {
margin: 0;
padding: 0;
}
#container {
width: 640px;
height: 480px;
}
.buttons-container {
margin: 15px 0 10px 15px;
}
</style>
</head>
<body>
<div class="buttons-container">
<button id="pie">render pie chart</button>
<button id="bg">change background to pink</button>
</div>
<div id="container" style=""></div>
<script>
var cnt = $('#container');
cnt.anychart('line', [3, 1, 2]);
$('#pie').click(function () {
cnt.anychart('pie', [4, 3, 3, 4]);
});
$('#bg').click(function () {
cnt.anychart().background('pink');
})
</script>
<script
src="https://cdnjs.cloudflare.com/ajax/libs/iframe-resizer/3.6.3/iframeResizer.contentWindow.min.js"></script>
</body>
</html>