继续浏览精彩内容
慕课网APP
程序员的梦工厂
打开
继续
感谢您的支持,我会继续努力的
赞赏金额会直接到老师账户
将二维码发送给自己后长按识别
微信支付
支付宝支付

Angular6 调用echarts的wordcloud插件,没有丢失标签的bug

果然菜菜
关注TA
已关注
手记 6
粉丝 11
获赞 84
this.accountCloudOptions = {
      series: [{
        type: 'wordCloud',
        size: ['80%', '80%'],
        textRotation: [0, 45, 90, -45],
        textPadding: 0,
        autoSize: {
          enable: true,
          minSize: 14
        },
        data: accountCloudList
      }]
    };
accountCloudList = [{
'name': 'a1',
'value': 123,
'textStyle': this.createRandomItemStyle()
}];
createRandomItemStyle() {
    return {
      normal: {
        color: 'rgb(' + [
          Math.round(Math.random() * 160),
          Math.round(Math.random() * 160),
          Math.round(Math.random() * 160)
        ].join(',') + ')'
      }
    };
  }
打开App,阅读手记
0人推荐
发表评论
随时随地看视频慕课网APP