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 2021/09/22 09:49:04 UTC

[GitHub] [echarts] brightzoe opened a new issue #15766: Customize each legend color separately

brightzoe opened a new issue #15766:
URL: https://github.com/apache/echarts/issues/15766


   ### What problem does this feature solve?
   #### Situation
   the legend color inherts the color from option.color or data.itemStyle.color,or you can define one color . if I want the different colors from data.itemStyles, I could only use one color that makes legends show the same color.
   
   expect it could support customize legend color sparately.
   
   #### MyCase
   I create a piechart,which expects the color is circular gradient. but there is  only linear gradient and radial gradient,I use linear gradient to simulate circular gradient,but the legend goes like the circular gradient, I want to customize the legend color gradient,but echarts don't support legend color array.
   
   the legend goes like the circular gradient:
   ![image](https://user-images.githubusercontent.com/17716768/134320371-c1673c15-c472-4c31-965d-a98e85e410fd.png)
   
   the performance I want:
   ![image](https://user-images.githubusercontent.com/17716768/134321202-bb107240-4a36-40be-934e-7518e56806b8.png)
   legend gradient is different with piechart.
   
   expect the legend colors supports array to customize every color.
   
   #### Similar issues
   https://github.com/apache/echarts/issues/6148
   
   ### What does the proposed API look like?
   legend:{
     itemColor:[color1,color2...]
   }
   
   <!-- This issue is generated by echarts-issue-helper. DO NOT REMOVE -->
   <!-- This issue is in English. DO NOT REMOVE -->


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

To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org

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] [echarts] pissang closed issue #15766: Customize each legend color separately

Posted by GitBox <gi...@apache.org>.
pissang closed issue #15766:
URL: https://github.com/apache/echarts/issues/15766


   


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

To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org

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] [echarts] plainheart commented on issue #15766: Customize each legend color separately

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


   Currently, you can configure like this,
   
   ```js
   legend: {
     data: [{
       name: 'Legend Name',
       itemStyle: {
         color: 'red'
       }
     }]
   }
   ```
   
   Refer to https://echarts.apache.org/en/option.html#legend.data.itemStyle.color for more details.
   


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

To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org

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] [echarts] brightzoe commented on issue #15766: Customize each legend color separately

Posted by GitBox <gi...@apache.org>.
brightzoe commented on issue #15766:
URL: https://github.com/apache/echarts/issues/15766#issuecomment-925446114


   
   
   
   
   > Currently, you can configure like this,
   > 
   > ```js
   > legend: {
   >   data: [{
   >     name: 'Legend Name',
   >     itemStyle: {
   >       color: 'red'
   >     }
   >   }]
   > }
   > ```
   > 
   > Refer to https://echarts.apache.org/en/option.html#legend.data.itemStyle.color for more details.
   
   @plainheart  Thanks ,I find the docs and usage of custimize legend. I didn't find the corresponding method till you help me. 
   
   Echarts supported this ,It resolved,thank u!


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

To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org

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] [echarts] echarts-bot[bot] commented on issue #15766: Customize each legend color separately

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


   Hi! We've received your issue and please be patient to get responded. 🎉
   The average response time is expected to be within one day for weekdays.
   
   In the meanwhile, please make sure that it contains **a minimum reproducible demo** and necessary **images** to illustrate. Otherwise, our committers will ask you to do so.
   
   *A minimum reproducible demo* should contain as little data and components as possible but can still illustrate your problem. This is the best way for us to reproduce it and solve the problem faster.
   
   You may also check out the [API](http://echarts.apache.org/api.html) and [chart option](http://echarts.apache.org/option.html) to get the answer.
   
   If you don't get helped for a long time (over a week) or have an urgent question to ask, you may also send an email to dev@echarts.apache.org. Please attach the issue link if it's a technical question.
   
   If you are interested in the project, you may also subscribe to our [mailing list](https://echarts.apache.org/en/maillist.html).
   
   Have a nice day! 🍵


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

To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org

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