echarts-wordcloud
Third-party Wordcloud extension based on wordcloud2.js for Apache ECharts.

Examples
Google Trends
ECharts Option Keywords
Install
<script src="echarts.min.js"></script>
<script src="echarts-wordcloud.min.js"></script>
Or
npm install echarts
npm install echarts-wordcloud
import * as echarts from 'echarts';
import 'echarts-wordcloud';
⚠️ NOTE:
echarts-wordcloud@2 is for echarts@5
echarts-wordcloud@1 is for echarts@4
Usage
var chart = echarts.init(document.getElementById('main'));
chart.setOption({
...
series: [{
type: 'wordCloud',
shape: 'circle',
keepAspect: false,
maskImage: maskImage,
left: 'center',
top: 'center',
width: '70%',
height: '80%',
right: null,
bottom: null,
sizeRange: [12, 60],
rotationRange: [-90, 90],
rotationStep: 45,
gridSize: 8,
drawOutOfBound: false,
shrinkToFit: false,
layoutAnimation: true,
textStyle: {
fontFamily: 'sans-serif',
fontWeight: 'bold',
color: function () {
return 'rgb(' + [
Math.round(Math.random() * 160),
Math.round(Math.random() * 160),
Math.round(Math.random() * 160)
].join(',') + ')';
}
},
emphasis: {
focus: 'self',
textStyle: {
textShadowBlur: 10,
textShadowColor: '#333'
}
},
data: [{
name: 'Farrah Abraham',
value: 366,
textStyle: {
}
}]
}]
});