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 data = getData();
7
8
var chart = anychart.tagCloud(data);
9
10
// Set context menu setting.
11
chart.contextMenu({enabled: false});
12
13
chart.title('Set context menu parameter as an object. Context menu is disabled using object in this sample');
14
chart.container('container');
15
chart.draw();
16
});
17
18
function getData() {
19
return [
20
{x: 'learning', value: 80},
21
{x: 'lists', value: 44},
22
{x: 'meaning', value: 40},
23
{x: 'useful', value: 36},
24
{x: 'different', value: 32},
25
{x: 'grammar', value: 28},
26
{x: 'teaching', value: 24},
27
{x: 'example', value: 20},
28
{x: 'includes', value: 56},
29
{x: 'thing', value: 12},
30
{x: 'vocabulary', value: 10},
31
{x: 'frequency', value: 10},
32
{x: 'phrases', value: 15},
33
{x: 'content', value: 27}
34
]
35
}