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 = "Here come old flat top, " +
5
"He come groovin' up slowly. " +
6
"He got joo joo eyeballs. " +
7
"He one holy roller. " +
8
"He got hair down to his knee. " +
9
"He wear no shoeshine. " +
10
"He got toe jam football. " +
11
"He got monkey finger. " +
12
"He shoot Coca-Cola. " +
13
"He say I know you, you know me. " +
14
"One thing I can tell you is " +
15
"You got to be free. " +
16
"Come together, right now" +
17
"Over me. " +
18
"He bad production. " +
19
"He got walrus gumboot. " +
20
"He got Ono sideboard. " +
21
"He one spinal cracker. " +
22
"He got feet down below his knee. " +
23
"Hold you in his armchair." +
24
"You can feel his disease. " +
25
"Come together, right now " +
26
"Over me. " +
27
"He roller coaster. " +
28
"He got early warning. " +
29
"He got muddy water. " +
30
"He one Mojo filter. " +
31
"He say one and one and one is three. " +
32
"Got to be good looking " +
33
"'Cause he's so hard to see. " +
34
"Come together, right now. " +
35
"Over me. ";
36
37
// create a chart and set the data
38
var chart = anychart.wordtree(data);
39
40
// set the root word
41
chart.word("He");
42
43
// set the chart title
44
chart.title("Word Tree: Data (Text)");
45
46
// set the container id
47
chart.container("container");
48
49
// initiate drawing the chart
50
chart.draw();
51
});