HTMLcopy
1
<div id="container"></div>
CSScopy
6
1
html, body, #container {
2
width: 100%;
3
height: 100%;
4
margin: 0;
5
padding: 0;
6
}
JavaScriptcopy
x
1
anychart.onDocumentReady(function () {
2
3
// create a stage
4
var stage = anychart.graphics.create("container");
5
6
// create data
7
var data = [
8
{x: "A", value: 637166},
9
{x: "B", value: 721630},
10
{x: "C", value: 148662},
11
{x: "D", value: 78662},
12
{x: "E", value: 90000}
13
];
14
15
// create and configure the first pie chart
16
var chart1 = anychart.pie(data);
17
chart1.title("Start Angle: Default (0\xb0)");
18
chart1.bounds(0, 0, "50%", "100%");
19
// set the chart container
20
chart1.container(stage);
21
// initiate drawing the chart
22
chart1.draw();
23
24
// create and configure the second pie chart
25
var chart2 = anychart.pie(data);
26
chart2.title("Start Angle: 90\xb0");
27
chart2.bounds("50%", 0, "50%", "100%");
28
// set the start angle
29
chart2.startAngle(90);
30
// set the chart container
31
chart2.container(stage);
32
// initiate drawing the chart
33
chart2.draw();
34
});