You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@echarts.apache.org by GitBox <gi...@apache.org> on 2019/06/10 03:49:16 UTC

[GitHub] [incubator-echarts] CoreyJu opened a new issue #10640: 新版本的echarts设置字符云颜色随机不起作用

CoreyJu opened a new issue #10640: 新版本的echarts设置字符云颜色随机不起作用
URL: https://github.com/apache/incubator-echarts/issues/10640
 
 
   var option = {
           series: [
               {
                   type: ‘wordCloud‘,
                   shape: ‘ellipse‘,
                   gridSize: 8,
                   textStyle: {
                       normal: {
                           fontFamily: ‘微软雅黑‘,
                           color: function () {
                               var colors = [‘#fda67e‘, ‘#81cacc‘, ‘#cca8ba‘, "#88cc81", "#82a0c5", ‘#fddb7e‘, ‘#735ba1‘, ‘#bda29a‘, ‘#6e7074‘, ‘#546570‘, ‘#c4ccd3‘];
                               return colors[parseInt(Math.random() * 10)];
                           }
                       }
                   },
                   data: cloudData
               }
           ]
       };

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@echarts.apache.org
For additional commands, e-mail: dev-help@echarts.apache.org