You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@echarts.apache.org by GitBox <gi...@apache.org> on 2020/06/17 02:49:53 UTC

[GitHub] [incubator-echarts] shangsj commented on issue #2701: 如何设置legend前的icon样式,比如颜色

shangsj commented on issue #2701:
URL: https://github.com/apache/incubator-echarts/issues/2701#issuecomment-645115340


   @impguier 的回答有用,改变了折线的颜色,然后:
   `
           color: ['#5A8FEE', '#ff7674'], // 图例icon颜色会变成对应的这两个颜色
           legend: {
             data: [
               {
                 name: '1数',
                 icon: 'circle',
                 textStyle: {
                   color: '#5A8FEE' // 图例文字颜色
                 }
               },
               {
                 name: '2数',
                 icon: 'circle',
                 textStyle: {
                   color: '#ff7674'
                 }
               }
             ]
           },
   `
   图例icon颜色和线的颜色一致,谢谢大神


----------------------------------------------------------------
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



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