echarts-wordcloud icon indicating copy to clipboard operation
echarts-wordcloud copied to clipboard

echarts5.0 echarts-wordcloud颜色不显示问题解决方案

Open chacefoo opened this issue 3 years ago • 5 comments


原来的版本文本颜色相关需要如下设置 但是颜色设置无法生效

textStyle: { normal: { color: function () { return 'rgb(' + [ Math.round(Math.random() * 160), Math.round(Math.random() * 160), Math.round(Math.random() * 160) ].join(',') + ')'; } }, emphasis: { shadowBlur: 10, shadowColor: '#333' } },


echarts5.0颜色相关需要如下设置(new)

textStyle: { color: function () { return ( "rgb(" + [ Math.round(Math.random() * 160), Math.round(Math.random() * 160), Math.round(Math.random() * 160), ].join(",") + ")" ); }, }, emphasis: { textStyle: { shadowBlur: 10, shadowColor: "#333", color: "#409EFF" } },

chacefoo avatar Mar 23 '21 14:03 chacefoo

你说的是解决方案还是提出问题呢?

georginzhang avatar Apr 14 '21 09:04 georginzhang

层级有错误,textStyle和color之间还有个normal,emphasis下面没有textStyle项,改了就正常了。我花了好多时间才发现的,希望对你有帮助。

y1x4 avatar Apr 20 '21 14:04 y1x4

感谢


发件人: yixu @.> 发送时间: 2021年4月20日 14:10 收件人: ecomfe/echarts-wordcloud @.> 抄送: Zhang Wei @.>; Comment @.> 主题: Re: [ecomfe/echarts-wordcloud] echarts5.0 echarts-wordcloud颜色不显示问题解决方案 (#114)

层级有错误,textStyle和color之间还有个normal,emphasis下面没有textStyle项,改了就正常了。我花了好多时间才发现的,希望对你有帮助。

― You are receiving this because you commented. Reply to this email directly, view it on GitHubhttps://github.com/ecomfe/echarts-wordcloud/issues/114#issuecomment-823305892, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ADJC2TQLGVU3MHRHG3YGXA3TJWDNRANCNFSM4ZVIBQWQ.

georginzhang avatar Apr 20 '21 16:04 georginzhang

层级有错误,textStyle和color之间还有个normal,emphasis下面没有textStyle项,改了就正常了。我花了好多时间才发现的,希望对你有帮助。

感谢感谢!

zhaoying-zoe avatar Jun 27 '23 01:06 zhaoying-zoe

ZhouQiangwei avatar Aug 02 '23 09:08 ZhouQiangwei