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 10:56:24 UTC

[GitHub] [incubator-echarts] confirmTing opened a new issue #12816: 自定义雷达图 legend icon 颜色

confirmTing opened a new issue #12816:
URL: https://github.com/apache/incubator-echarts/issues/12816


   What problem does this feature solve?
   当雷达图设置 areaStyle 且颜色是渐变色, legend 图例 icon 颜色也是渐变色,希望可以单独设置为单色
   
   以下是我的 option
   
   ``` json
   {
     "color": [
       "rgba(136,98,255,1)",
       "rgba(255,140,0,1)",
       "rgba(51,137,255,1)"
     ],
     "legend": {
       "left": 30,
       "textStyle": {
         "color": "#666"
       },
       "data": [
         {
           "name": "张三",
           "icon": "circle"
         },
         {
           "name": "李四",
           "icon": "circle"
         },
         {
           "name": "王五",
           "icon": "circle"
         }
       ]
     },
     "tooltip": {
       "show": false,
       "trigger": "item",
       "backgroundColor": "#fff",
       "borderColor": "#eee",
       "padding": 16,
       "borderWidth": 1,
       "extraCssText": "box-shadow:0px 4px 10px 0px rgba(0,0,0,0.08);",
       "textStyle": {
         "color": "#666"
       }
     },
     "radar": {
       "indicator": [
         {
           "name": "求实进取精神",
           "max": 9.6
         },
         {
           "name": "演绎思维",
           "max": 9.6
         },
         {
           "name": "归纳思维",
           "max": 9.6
         },
         {
           "name": "服务精神",
           "max": 9.6
         },
         {
           "name": "人才培养能力",
           "max": 9.6
         },
         {
           "name": "监控能力",
           "max": 9.6
         },
         {
           "name": "证实正直",
           "max": 9.6
         },
         {
           "name": "搜集信息",
           "max": 9.6
         }
       ],
       "radius": "60%",
       "shape": "circle",
       "name": {
         "textStyle": {
           "color": "#72ACD1"
         }
       },
       "splitArea": {
         "areaStyle": {
           "color": [
             "rgba(255, 255, 255, 1)"
           ]
         }
       },
       "axisLine": {
         "lineStyle": {
           "color": "rgba(221, 221, 221, 1)"
         }
       },
       "splitLine": {
         "lineStyle": {
           "type": "dashed",
           "color": "rgba(238, 238, 238, 1)"
         }
       }
     },
     "series": [
       {
         "name": "雷达图",
         "type": "radar",
         "emphasis": {
           "lineStyle": {
             "width": 2
           }
         },
         "data": [
           {
             "symbol": "circle",
             "areaStyle": {},
             "value": [
               4,
               8,
               8,
               7,
               4,
               7,
               8,
               3
             ],
             "name": "张三"
           },
           {
             "symbol": "circle",
             "areaStyle": {},
             "value": [
               6,
               3,
               4,
               5,
               4,
               6,
               5,
               8
             ],
             "name": "李四"
           },
           {
             "symbol": "circle",
             "areaStyle": {},
             "value": [
               6,
               7,
               6,
               5,
               3,
               8,
               7,
               5
             ],
             "name": "王五"
           }
         ],
         "color": [
           {
             "type": "linear",
             "x": 0,
             "y": 1,
             "x2": 0,
             "y2": 0,
             "colorStops": [
               {
                 "offset": 0,
                 "color": "rgba(80, 51, 255, 0.4)"
               },
               {
                 "offset": 1,
                 "color": "rgba(148, 89, 255, 0.4)"
               }
             ],
             "global": false
           },
           {
             "type": "linear",
             "x": 0,
             "y": 1,
             "x2": 0,
             "y2": 0,
             "colorStops": [
               {
                 "offset": 0,
                 "color": "rgba(254, 128, 38, 0.4)"
               },
               {
                 "offset": 1,
                 "color": "rgba(255, 200, 38, 0.4)"
               }
             ],
             "global": false
           },
           {
             "type": "linear",
             "x": 0,
             "y": 1,
             "x2": 0,
             "y2": 0,
             "colorStops": [
               {
                 "offset": 0,
                 "color": "rgba(77, 157, 255, 0.4)"
               },
               {
                 "offset": 1,
                 "color": "rgba(64, 137, 255, 0.4)"
               }
             ],
             "global": false
           }
         ]
       }
     ]
   }
   ```


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


[GitHub] [incubator-echarts] confirmTing closed issue #12816: 自定义雷达图 legend icon 颜色

Posted by GitBox <gi...@apache.org>.
confirmTing closed issue #12816:
URL: https://github.com/apache/incubator-echarts/issues/12816


   


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


[GitHub] [incubator-echarts] plainheart commented on issue #12816: 自定义雷达图 legend icon 颜色

Posted by GitBox <gi...@apache.org>.
plainheart commented on issue #12816:
URL: https://github.com/apache/incubator-echarts/issues/12816#issuecomment-645342538


   当前可以使用`legend.itemStyle.color`来配置所有的图例颜色,不过`legend.itemStyle`并未在文档中列出,又由于`legend.itemStyle.color`只能对全部图例生效,无法对个项进行单独设置,暂时没想到什么方法可以满足这个需求,可以考虑增加单独设置图例样式的功能,并使`legend.itemStyle.color`支持回调函数。


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


[GitHub] [incubator-echarts] plainheart removed a comment on issue #12816: 自定义雷达图 legend icon 颜色

Posted by GitBox <gi...@apache.org>.
plainheart removed a comment on issue #12816:
URL: https://github.com/apache/incubator-echarts/issues/12816#issuecomment-645342538


   当前可以使用`legend.itemStyle.color`来配置所有的图例颜色,不过`legend.itemStyle`并未在文档中列出,又由于`legend.itemStyle.color`只能对全部图例生效,无法对个项进行单独设置,暂时没想到什么方法可以满足这个需求,可以考虑增加单独设置图例样式的功能,并使`legend.itemStyle.color`支持回调函数。


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


[GitHub] [incubator-echarts] echarts-bot[bot] commented on issue #12816: 自定义雷达图 legend icon 颜色

Posted by GitBox <gi...@apache.org>.
echarts-bot[bot] commented on issue #12816:
URL: https://github.com/apache/incubator-echarts/issues/12816#issuecomment-645303875


   This issue is not created using [issue template](https://ecomfe.github.io/echarts-issue-helper/) so I'm going to close it. 🙊
   Sorry for this, but it helps save our maintainers' time so that more developers get helped.
   Feel free to create another issue using the issue template.
   
   If you think you have already made your point clear without the template, or your problem cannot be covered by it, you may re-open this issue again.
   
   这个 issue 未使用 [issue 模板](https://ecomfe.github.io/echarts-issue-helper/?lang=zh-cn) 创建,所以我将关闭此 issue。
   为此带来的麻烦我深表歉意,但是请理解这是为了节约社区维护者的时间,以更高效地服务社区的开发者群体。
   如果您愿意,可以请使用 issue 模板重新创建 issue。
   
   如果你认为虽然没有使用模板,但你已经提供了复现问题的充分描述,或者你的问题无法使用模板表达,也可以重新 open 这个 issue。


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