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", weight: 5}
18
]}
19
];
20
21
// create a chart and set the data
22
var chart = anychart.wordtree(data, "as-tree");
23
24
// set the chart title
25
chart.title("Word Tree: Data (Tree)");
26
27
// set the container id
28
chart.container("container");
29
30
// initiate drawing the chart
31
chart.draw();
32
});