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 data = getData();
3
4
var chart = anychart.tagCloud(data);
5
6
// Set accessibility setting.
7
// Mode adds a hidden table available for VoiceOver.
8
// You can use inspect element tool to see the table.
9
chart.a11y({mode: 'data-table'});
10
11
chart.title('Set accessibility parameter as an object');
12
chart.container('container');
13
chart.draw();
14
});
15
16
function getData() {
17
return [
18
{x: 'learning', value: 80},
19
{x: 'lists', value: 44},
20
{x: 'meaning', value: 40},
21
{x: 'useful', value: 36},
22
{x: 'different', value: 32},
23
{x: 'grammar', value: 28},
24
{x: 'teaching', value: 24},
25
{x: 'example', value: 20},
26
{x: 'includes', value: 56},
27
{x: 'thing', value: 12},
28
{x: 'vocabulary', value: 10},
29
{x: 'frequency', value: 10},
30
{x: 'phrases', value: 15},
31
{x: 'content', value: 27}
32
]
33
}