JAVA日报

词云图的代码

var option={
tooltip: {//提示框组件
show:true,
trigger: 'item',
formatter:function(params,ticket, callback){//提示框浮层内容格式器,支持字符串模板和回调函数两种形式。
var res="asdas"+'<br />';

return res;
}//数据格式化
},//提示框样式
title: {
text: ''
},
series: [{
type : 'wordCloud', //类型为字符云
shape:'smooth', //平滑
gridSize : 8, //网格尺寸
size : ['50%','50%'],
//sizeRange : [ 50, 100 ],
rotationRange : [-45, 0, 45, 90,60,16], //旋转范围
textStyle : {
normal : {
fontFamily:'微软雅黑',
color: function() {
return 'rgb(' +
Math.round(Math.random() * 255) +
', ' + Math.round(Math.random() * 255) +
', ' + Math.round(Math.random() * 255) + ')'
}
},
emphasis : {
shadowBlur : 5, //阴影距离
shadowColor : '#333' //阴影颜色
}
},
left: 'center',
top: 'center',
right: null,
bottom: null,
width:'100%',
height:'100%',
data:[]
}]
};

 

提示框组件还未实现

posted @ 2021-10-31 22:00  我的未来姓栗山  阅读(18)  评论(0编辑  收藏  举报