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
{value: "Slavic Languages",
6
children: [
7
{value: "East", children: [
8
{value: "Russian"},
9
{value: "Ukrainian"},
10
{value: "Belarusian"}
11
]},
12
{value: "West", children: [
13
{value: "Polish"},
14
{value: "Czech"},
15
{value: "Slovak"}
16
]},
17
{value: "South", children: [
18
{value: "Bulgarian"},
19
{value: "Serbian"},
20
{value: "Croatian"},
21
{value: "Slovene"},
22
{value: "Macedonian"}
23
]}
24
]}
25
];
26
27
// create a chart and set the data
28
var chart = anychart.wordtree(data, "as-tree");
29
30
// set the chart title
31
chart.title("Word Tree: Font");
32
33
// configure the font
34
chart.fontColor("#1976d2");
35
chart.fontWeight(600);
36
chart.maxFontSize(20);
37
38
// set the container id
39
chart.container("container");
40
41
// initiate drawing the chart
42
chart.draw();
43
});