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: "Balthasar", value: 1},
6
{x: "Melchior", value: 3},
7
{x: "Gaspar", value: 2}
8
]);
9
10
// font labels font settings
11
chart.labels().fontFamily("Menlo");
12
chart.labels().fontSize(18);
13
chart.labels().fontDecoration("underline");
14
chart.labels().fontWeight(900);
15
16
// set title
17
chart.title("Labels font");
18
19
// draw
20
chart.container("container");
21
chart.draw();
22
});