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 dataSet = anychart.data.set([
3
{x: 'learning', value: 80},
4
{x: 'lists', value: 44},
5
{x: 'meaning', value: 40},
6
{x: 'useful', value: 36},
7
{x: 'different', value: 32},
8
{x: 'grammar', value: 28},
9
{x: 'teaching', value: 24},
10
{x: 'example', value: 20},
11
{x: 'includes', value: 56},
12
{x: 'thing', value: 12},
13
{x: 'vocabulary', value: 10},
14
{x: 'frequency', value: 10},
15
{x: 'phrases', value: 15},
16
{x: 'content', value: 27}
17
]);
18
19
var chart = anychart.tagCloud();
20
21
var view = dataSet.mapAs();
22
23
var filteredView = view.filter('value', function (value) {
24
return value >= 20;
25
});
26
27
// Set data.
28
chart.data(filteredView);
29
30
chart.title('Set data using a filtered view');
31
chart.container('container');
32
chart.draw();
33
});