-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathexample.html
More file actions
62 lines (48 loc) · 1.67 KB
/
example.html
File metadata and controls
62 lines (48 loc) · 1.67 KB
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
<html><head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<script src="https://cdn.anychart.com/releases/v8/js/anychart-base.min.js"></script>
<script src="https://cdn.anychart.com/releases/v8/js/anychart-exports.min.js"></script>
<script src="https://cdn.anychart.com/releases/v8/js/anychart-vml.min.js"></script>
<link rel="stylesheet" href="https://cdn.anychart.com/releases/v8/css/anychart-ui.min.css"/>
<link rel="stylesheet" href="https://cdn.anychart.com/releases/v8/fonts/css/anychart.min.css"/>
<style type="text/css">
html, body, #container {
width: 100%;
height: 100%;
margin: 0;
padding: 0;
}
</style>
</head>
<body>
<div id="container"></div>
<script type="text/javascript">//<![CDATA[
anychart.onDocumentReady(function() {
// create pie chart with passed data
chart = anychart.pie([
['Apples', 6371664],
['Pears', 789622],
['Bananas', 7216301],
['Grapes', 1486621],
['Oranges', 1200000]
]);
// set container id for the chart
chart.container('container');
// set chart title text settings
chart.title('Fruits imported in 2015 (in kg)');
// set chart labels position to outside
chart.labels().position('outside');
// set legend title text settings
chart.legend(true);
chart.legend().title('Retail channels');
chart.legend().title().padding([0, 0, 10, 0]);
// set legend position and items layout
chart.legend().position('center-bottom');
chart.legend().itemsLayout('horizontal');
chart.legend().align('center');
// initiate chart drawing
chart.draw();
});
//]]>
</script>
</body></html>