echarts3wordCloud单词重叠
示例
代码:
myChart1.setOption({
title: {
text: '词云图',
backgroundColor: '#a2ddff'
},
tootip: {
show: true
},
series: {
name: '词云图',
type: 'wordCloud',
textStyle: {
normal: {
color: function () {
return 'rgb(' + [
Math.round(Math.random() * 160),
Math.round(Math.random() * 160),
Math.round(Math.random() * 160)
].join(',') + ')'
}
}
},
textRotation: [0, 90, -45, 45],
autoSize: true,
data: data.dataCloud
}
})
建议可以用
jqcloud
代替echarts
的字符云样式比较灵活 可以自己定义 包括颜色、位置、字符大小