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/11/18 03:53:39 UTC

[GitHub] [incubator-echarts] zmzimpl commented on issue #11788: Set emphasis color same with normal color

zmzimpl commented on issue #11788:
URL: https://github.com/apache/incubator-echarts/issues/11788#issuecomment-729387732


   > **Actually You can!**
   > 
   > > When we set the normal color in echarts, we change the `itemStyle.color` in each item of `data`.
   > > If u want to set the color of highlight status, u can change the `emphasis.itemStyle.color` of the target item.
   > 
   > **The `javascript` looks like that:**
   > 
   > ```js
   > ...
   > data: [
   >     {
   >         value: 75,
   >         itemStyle: {
   >             color: '#0B9BEE'
   >         },
   >         emphasis: {
   >             itemStyle: {
   >                 color: '#0B9BEE'
   >             }
   >         }
   >     },
   >     {
   >         value: 25,
   >         itemStyle: {
   >             color: '#E5F6FF'
   >         },
   >         emphasis: {
   >             itemStyle: {
   >                 color: '#E5F6FF'
   >             }
   >         }
   >     }
   > ]
   > ...
   > ```
   
   It's  work to change the `emphasis.itemStyle.color` of the target item. But when the item color was set by `option.color`, It's not a convenient thing to change `option.color` and `emphasis.itemStyle.color`. I think it's awesome to control it by a new property.


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