vue-wordcloud配置参数
时间: 2023-08-19 09:04:43 浏览: 52
Vue-Wordcloud是一个用于生成词云的Vue组件,它的配置参数如下:
1. words:数组,包含词云中要显示的单词及其权重。示例:[{text: 'hello', weight: 10}, {text: 'world', weight: 5}]
2. options:对象,包含词云的各种选项。示例:{minSize: 10, maxSize: 50, fontFamily: 'Arial'}
3. width:词云的宽度,可以是数字或字符串。示例:'500px'或500
4. height:词云的高度,可以是数字或字符串。示例:'300px'或300
5. backgroundColor:词云的背景色,可以是字符串或对象。示例:'white'或{r: 255, g: 255, b: 255}
6. shape:词云的形状,可以是字符串或函数。示例:'circle'或function(word, weight, fontSize, radius, theta) { return [x, y]; }
7. ellipticity:词云的椭圆度,控制词云中单词的形状。可以是数字或函数。示例:0.65或function() { return Math.random() > 0.5 ? 0.5 : 0.8; }
8. rotateRatio:旋转单词的比例。示例:0.5
9. rotationSteps:旋转单词的步数。示例:2
10. shuffle:是否对单词进行洗牌。示例:true或false
11. hover:鼠标悬停在单词上时的回调函数。示例:function(item, dimension, event) { console.log(item, dimension, event); }
12. click:单击单词时的回调函数。示例:function(item, dimension, event) { console.log(item, dimension, event); }
相关推荐
![pdf](https://img-home.csdnimg.cn/images/20210720083512.png)
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![rar](https://img-home.csdnimg.cn/images/20210720083606.png)
![-](https://img-home.csdnimg.cn/images/20210720083327.png)
![-](https://img-home.csdnimg.cn/images/20210720083327.png)
![-](https://img-home.csdnimg.cn/images/20210720083327.png)
![-](https://img-home.csdnimg.cn/images/20210720083327.png)
![-](https://img-home.csdnimg.cn/images/20210720083327.png)
![-](https://csdnimg.cn/download_wenku/file_type_column_c1.png)
![-](https://csdnimg.cn/download_wenku/file_type_column_c1.png)
![-](https://csdnimg.cn/download_wenku/file_type_column_c1.png)
![-](https://csdnimg.cn/download_wenku/file_type_column_c1.png)
![-](https://csdnimg.cn/download_wenku/file_type_column_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)