HTMLcopy
1
<div id="container"></div>
CSScopy
8
1
html,
2
body,
3
#container {
4
width: 100%;
5
height: 100%;
6
margin: 0;
7
padding: 0;
8
}
JavaScriptcopy
x
1
anychart.onDocumentReady(function () {
2
$.ajax( 'https://gist.githubusercontent.com/shacheeswadia/ccbccc482b1fb691405e07772c0fbfa0/raw/fb7b5972838b4212f4551c4cc9d5fc026fc2e8c3/littleprince.txt'
3
).done(function (text) {
4
5
// create a word tree chart
6
var chart = anychart.wordtree(text);
7
8
// set the root word
9
chart.word('The');
10
11
// drill down to the next word in the tree
12
chart.drillTo('prince');
13
14
// set the container id for the word tree chart
15
chart.container('container');
16
17
// initiate the drawing of the word tree chart
18
chart.draw();
19
20
});
21
});