echarts 词云图和Map图兼容

同一个项目同时使用词云图和Map图后,可能会因为版本问题导致图报错

以下版本可同时兼容这两个图:

"echarts": "^4.8.0",
"echarts-wordcloud": "^1.1.3",

按之前的词云图配置后,默认词条都成了红色,修改给下边代码即可恢复:


// 词云图的字体颜色配置如下:
textStyle: {
   normal: {
    fontWeight: 'bold',
    color: function () {
      return 'rgb('
        + [Math.round(Math.random() * 256),
        Math.round(Math.random() * 256),
        Math.round(Math.random() * 256)]
          .join(',') + ')';
    }
  },
  emphasis: {
    shadowBlur: 10,
    shadowColor: '#333'
  }
},
笨鸟飞呀飞~
原文地址:https://www.cnblogs.com/geekfeier/p/15696862.html