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/21 03:43:28 UTC

[GitHub] [echarts] jiawulin001 commented on issue #16909: [Bug] legend.itemStyle.decal is invalid

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