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 data
4
var data = [
5
{x: "A", value: 637166},
6
{x: "B", value: 721630},
7
{x: "C", value: 148662},
8
{x: "D", value: 78662},
9
{x: "E", value: 90000}
10
];
11
12
// create a chart and set the data
13
var chart = anychart.pie();
14
15
chart.data(data);
16
17
chart.labels().enabled(true);
18
// chart.labels().rotation(90);
19
chart.labels().fontFamily('Calibri');
20
chart.labels().fontSize(44);
21
22
// set the position of labels
23
chart.labels().position("outside");
24
25
// configure connectors
26
chart.connectorStroke({color: "#595959", thickness: 2, dash:"2 2"});
27
28
// disable the legend
29
chart.legend(false);
30
31
// set the chart title
32
chart.title("Pie Chart: Outer Labels");
33
34
// set the container id
35
chart.container("container");
36
37
// initiate drawing the chart
38
chart.draw();
39
});