废话不多说先看下效果是不是你想要的,宝贝

一,在vue中引入echarts
import echarts from 'echarts'
二、定义容器
<div id="wordCloudChart" style="width: 545px;height: 280px;">
三、自定义样式(自定义的样式需要自己去探索)
mounted(){
this.drawWorldCloud()
},
methods:{
drawWorldCloud(){
this.myChartWordCloud = this.$echarts.init(document.getElementById("wordCloudChart"))
this.myChartWordCloud.setOption({
tooltip: {
show: false
},
series: [{
name: '热词分析',
type: 'wordCloud',
sizeRange: [14, 50],
rotationRange: [0, 0],
shape: 'circle',
textPadding: 0,
autoSize: {
enable: true,
minSize: 6
},
textStyle: {
normal: {
color: function() {
return 'rgb(' + [
Math.round(Math.random() * 160),
Math.round(Math.random() * 160),
Math.round(Math.random() * 160)
].join(',') + ')';
}
},
emphasis: {
shadowBlur: 10,
shadowColor: '#333'
}
},
data: this.hotList
}]
})
window.addEventListener("resize", function () {
myChart.resize();
});
},
}