-
Notifications
You must be signed in to change notification settings - Fork 0
/
demo.html
55 lines (51 loc) · 1.46 KB
/
demo.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width,initial-scale=1">
<title>JWordCloud</title>
<style>
.content {
background: rgba(0,0,0,0.9);
height: 100%;
display: flex;
align-items: center;
justify-content: center;
}
</style>
</head>
<body>
<div class="content"></div>
<script type="text/javascript" src="./src/js/JWordCloud.js"></script>
<script>
var words = {
'JWordCloud': 10100,
'3d':420,
'JavaScript': 23,
'CSS3':45,
'Animation': 109,
'React': 56,
'Vue': 78,
'Jvue': 107,
'App': 118,
'Web': 109,
'Html5': 67,
'Java': 69
}
var wordCloud = new JWordCloud('.content', words, {
// 词云渲染区域大小
radius: 300,
// 词云动画速度模式 slow, normal, fast
maxSpeed: 'normal',
initSpeed: 'normal',
// 词云颜色板
colors: ['red','blue','orange','green','purple', 'yellow','skyblue','#673ab7','#3f51b5','#ff5722','#607d8b'],
// 词云标准值字体大小
fontSize: 32,
maxFontSize: 72,
minFontSize: 20
});
</script>
</body>
</html>