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
var chart = anychart.wordtree(getData());
3
4
// Set chart credits settings.
5
// You can't customize credits without a license key. See https://www.anychart.com/buy/ to learn more.
6
chart.credits({text: 'Changed credits', url: 'https://www.anychart.com/buy/'});
7
8
chart.title('Set chart credits parameter as an object');
9
chart.container('container');
10
chart.draw();
11
});
12
13
function getData() {
14
return [
15
'Earth is round',
16
'Earth is the third planet from the Sun',
17
'Earth goes around the Sun',
18
'Earth has one satellite',
19
'Earth has a radius of 6 371 km',
20
'Earth is less than the Sun',
21
'Earth is less than the Jupiter',
22
'Earth is less than the Saturn',
23
'Earth is less than the Uranus',
24
'Earth is less than the Neptune',
25
'Earth is bigger than the Venus',
26
'Earth is bigger than the Mars',
27
'Earth is bigger than the Mercury',
28
'Earth has a powerful magnetic field'
29
]
30
}