echarts-wordcloud
echarts-wordcloud copied to clipboard
echarts5.0 echarts-wordcloud颜色不显示问题解决方案
原来的版本文本颜色相关需要如下设置 但是颜色设置无法生效
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" } },
你说的是解决方案还是提出问题呢?
层级有错误,textStyle和color之间还有个normal,emphasis下面没有textStyle项,改了就正常了。我花了好多时间才发现的,希望对你有帮助。
感谢
发件人: 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.
层级有错误,textStyle和color之间还有个normal,emphasis下面没有textStyle项,改了就正常了。我花了好多时间才发现的,希望对你有帮助。
感谢感谢!
库