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
3
// create data
4
var data = "Tyger, tyger, burning bright " +
5
"In the forests of the night, " +
6
"What immortal hand or eye " +
7
"Could frame thy fearful symmetry? " +
8
"In what distant deeps or skies " +
9
"Burnt the fire of thine eyes? " +
10
"On what wings dare he aspire? " +
11
"What the hand dare seize the fire? " +
12
"And what shoulder and what art " +
13
"Could twist the sinews of thy heart? " +
14
"And, when thy heart began to beat, " +
15
"What dread hand and what dread feet? " +
16
"What the hammer? what the chain? " +
17
"In what furnace was thy brain? " +
18
"What the anvil? what dread grasp " +
19
"Dare its deadly terrors clasp? " +
20
"When the stars threw down their spears, " +
21
"And watered heaven with their tears, " +
22
"Did He smile His work to see? " +
23
"Did He who made the lamb make thee? " +
24
"Tyger, tyger, burning bright " +
25
"In the forests of the night, " +
26
"What immortal hand or eye " +
27
"Dare frame thy fearful symmetry? ";
28
29
// create a chart
30
var chart = anychart.tagCloud();
31
32
// set the parsing mode and configure parsing settings
33
chart.data(data, {
34
mode: "by-word",
35
maxItems: 16,
36
ignoreItems: [
37
"the",
38
"and",
39
"he",
40
"or",
41
"of",
42
"in",
43
"thy",
44
]
45
});
46
47
// set the chart title
48
chart.title("Tag Cloud Chart: Data (Parsing Text)");
49
50
// set the container id
51
chart.container("container");
52
53
// initiate drawing the chart
54
chart.draw();
55
});