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 Wordtree Chart.
4
var chart = anychart.wordtree([
5
'Earth is round',
6
'Earth is the third planet from the Sun',
7
'Earth goes around the Sun',
8
'Earth has one satellite',
9
'Earth has a radius of 6 371 km',
10
'Earth is less than the Sun',
11
'Earth is less than the Jupiter',
12
'Earth is less than the Saturn',
13
'Earth is less than the Uranus',
14
'Earth is less than the Neptune',
15
'Earth is bigger than the Venus',
16
'Earth is bigger than the Mars',
17
'Earth is bigger than the Mercury',
18
'Earth has a powerful magnetic field'
19
]);
20
21
chart.title('Create a Wordtree Chart');
22
chart.container('container');
23
chart.draw();
24
});