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 2022/04/19 06:35:41 UTC

[GitHub] [echarts] jouryfirst opened a new issue, #16909: [Bug] legend.itemStyle.decal is invalid

jouryfirst opened a new issue, #16909:
URL: https://github.com/apache/echarts/issues/16909

   ### Version
   
   5.2.1+
   
   ### Link to Minimal Reproduction
   
   https://echarts.apache.org/examples/zh/editor.html?c=doc-example/aria-pie&version=5.2.1
   
   ### Steps to Reproduce
   
   option = {
     aria: {
       enabled: true
     },
     legend: {
       itemStyle: {
         decal: 'none'
       }
     },
     title: {
       text: '某站点用户访问来源',
       left: 'center'
     },
     series: [
       {
         name: '访问来源',
         type: 'pie',
         data: [
           { value: 335, name: '直接访问' },
           { value: 310, name: '邮件营销' },
           { value: 234, name: '联盟广告' },
           { value: 135, name: '视频广告' },
           { value: 1548, name: '搜索引擎' }
         ]
       }
     ]
   };
   
   ### Current Behavior
   
   The docs say that while legend.itemStyle.decal is set to be 'none', no decal will be used.
   I've set legend.itemStyle.decal to 'none', But the decal is still visible in V5.2.1+
   ![issue1](https://user-images.githubusercontent.com/32251085/163940708-93239786-11b0-4fcf-b641-a73ea6f0e0f7.jpg)
   ![issue2](https://user-images.githubusercontent.com/32251085/163940723-9e25e255-d72c-4885-8e74-250de6624d10.jpg)
   
   
   
   ### Expected Behavior
   
   as in the version 5.2.0, legend will be a solid color while legend.itemStyle.decal set 'none'
   
   ### Environment
   
   _No response_
   
   ### Any additional comments?
   
   _No response_


-- 
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.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 #16909: [Bug] legend.itemStyle.decal is invalid

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

   @jouryfirst It seems you are not using English, I've helped translate the content automatically. To make your issue understood by more people and get helped, we'd like to suggest using English next time. 🤗
   <details><summary><b>TRANSLATED</b></summary><br>
   
   **BODY**
   
   ### Version
   
   5.2.1+
   
   ### Link to Minimal Reproduction
   
   https://echarts.apache.org/examples/en/editor.html?c=doc-example/aria-pie&version=5.2.1
   
   ### Steps to Reproduce
   
   option = {
     aria: {
       enabled: true
     },
     legend: {
       itemStyle: {
         decal: 'none'
       }
     },
     title: {
       text: 'A site's user access source',
       left: 'center'
     },
     series: [
       {
         name: 'Access source',
         type: 'pie',
         data: [
           { value: 335, name: 'Direct access' },
           { value: 310, name: 'email marketing' },
           { value: 234, name: 'affiliate ad' },
           { value: 135, name: 'video ad' },
           { value: 1548, name: 'search engine' }
         ]
       }
     ]
   };
   
   ### Current Behavior
   
   The docs say that while legend.itemStyle.decal is set to be 'none', no decal will be used.
   I've set legend.itemStyle.decal to 'none', But the decal is still visible in V5.2.1+
   ![issue1](https://user-images.githubusercontent.com/32251085/163940708-93239786-11b0-4fcf-b641-a73ea6f0e0f7.jpg)
   ![issue2](https://user-images.githubusercontent.com/32251085/163940723-9e25e255-d72c-4885-8e74-250de6624d10.jpg)
   
   
   
   ### Expected Behavior
   
   as in the version 5.2.0, legend will be a solid color while legend.itemStyle.decal set 'none'
   
   ### Environment
   
   _No response_
   
   ### Any additional comments?
   
   _No response_
   </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] pissang closed issue #16909: [Bug] legend.itemStyle.decal is invalid

Posted by GitBox <gi...@apache.org>.
pissang closed issue #16909: [Bug] legend.itemStyle.decal is invalid
URL: https://github.com/apache/echarts/issues/16909


-- 
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] jiawulin001 commented on issue #16909: [Bug] legend.itemStyle.decal is invalid

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

   ### Problem locating
   In my opinion, the problem is here:
   https://github.com/apache/echarts/blob/4a52199842039d7fa6019ee8584d1a395fbc771a/src/component/legend/LegendView.ts#L568
   `legend.itemStyle.decal` is directly overwritten by the series itemStyle. Also, the origin value of `legend.itemStyle.decal` is not passed in either because when echarts try getting items in `legend.itemStyle` here:
   https://github.com/apache/echarts/blob/4a52199842039d7fa6019ee8584d1a395fbc771a/src/model/mixin/makeStyleMapper.ts#L46
   `decal` is not included in the list of ITEM_STYLE_KEY_MAP:
   https://github.com/apache/echarts/blob/4a52199842039d7fa6019ee8584d1a395fbc771a/src/model/mixin/itemStyle.ts#L25-L41
   
   ### Plan to solve
   So my plan to solve this is:
   1. Add `decal` to the list of ITEM_STYLE_KEY_MAP (concern in comment is stated below)
   2. Add a check if `decal` is none.
   
   The comment here says 
   ```
   // Option decal is in `DecalObject` but style.decal is in `PatternObject`.
   // So do not transfer decal directly.
   ```
   But this is for reading what decal pattern is and here I am adding `decal` just to check if user sets it to 'none'. So I don't think it will affect `decal` in other places
   **Submitting a PR to solve this**


-- 
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 #16909: [Bug] legend.itemStyle.decal is invalid

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

   This issue is labeled with `difficulty: easy`.
   @jouryfirst Would you like to debug it by yourself? This is a quicker way to get your problem fixed. Or you may wait for the community to fix.
   
   Please have a look at [How to debug ECharts](https://github.com/apache/echarts/blob/master/CONTRIBUTING.md#how-to-debug-echarts) if you'd like to give a try. 🤓


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