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
// To change the way how context menu looks you need to change CSS.
3
// By default CSS from AnyChart CDN is used: https://cdn.anychart.com/releases/8.13.0/css/anychart-ui.min.css
4
// Download it, alter, upload to your server and link from your pages to change the look.
5
6
var chart = anychart.wordtree(getData());
7
8
// Disable context menu.
9
chart.contextMenu(false);
10
11
chart.title('Disable context menu. Right-click on the chart');
12
chart.container('container');
13
chart.draw();
14
});
15
16
function getData() {
17
return [
18
'Earth is round',
19
'Earth is the third planet from the Sun',
20
'Earth goes around the Sun',
21
'Earth has one satellite',
22
'Earth has a radius of 6 371 km',
23
'Earth is less than the Sun',
24
'Earth is less than the Jupiter',
25
'Earth is less than the Saturn',
26
'Earth is less than the Uranus',
27
'Earth is less than the Neptune',
28
'Earth is bigger than the Venus',
29
'Earth is bigger than the Mars',
30
'Earth is bigger than the Mercury',
31
'Earth has a powerful magnetic field'
32
]
33
}