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();
3
4
// Set chart data.
5
chart.data(
6
'Earth is the third planet from the Sun and the only astronomical object known to harbor life. ' +
7
'According to radiometric dating and other sources of evidence, Earth formed over 4.5 billion years ago. ' +
8
'Earth\'s gravity interacts with other objects in space, especially the Sun and the Moon, Earth\'s only natural satellite. ' +
9
'Earth revolves around the Sun in 365.26 days, a period known as an Earth year. ' +
10
'During this time, Earth rotates about its axis about 366.26 times. ' +
11
'Earth\'s axis of rotation is tilted with respect to its orbital plane, producing seasons on Earth. ' +
12
'The gravitational interaction between Earth and the Moon causes ocean tides, stabilizes Earth\'s orientation on its axis, and gradually slows its rotation. ' +
13
'Earth is the densest planet in the Solar System and the largest of the four terrestrial planets. ' +
14
'Earth\'s lithosphere is divided into several rigid tectonic plates that migrate across the surface over periods of many millions of years. ' +
15
'About 71% of Earth\'s surface is covered with water, mostly by oceans. ' +
16
'The remaining 29% is land consisting of continents and islands that together have many lakes, rivers and other sources of water that contribute to the hydrosphere. ' +
17
'The majority of Earth\'s polar regions are covered in ice, including the Antarctic ice sheet and the sea ice of the Arctic ice pack. ' +
18
'Earth\'s interior remains active with a solid iron inner core, a liquid outer core that generates the Earth\'s magnetic field, and a convecting mantle that drives plate tectonics. '
19
);
20
21
chart.word('Earth\'s');
22
chart.maxFontSize(15);
23
chart.title('Set chart data parameter as a string');
24
chart.container('container');
25
chart.draw();
26
});