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 chart
4
var chart = anychart.pie([
5
{x: "Identity", value: 3},
6
{x: "Non-contradiction", value: 3},
7
{x: "Excluded middle", value: 3}
8
]);
9
10
// set labels position
11
labels = chart.labels();
12
labels.width(80);
13
labels.height(40);
14
15
labels.background().enabled(true);
16
labels.background().fill("Black 0.4");
17
labels.vAlign("middle");
18
labels.hAlign("center");
19
20
// set title
21
chart.title("Labels size");
22
23
// draw
24
chart.container("container");
25
chart.draw();
26
});