echarts icon indicating copy to clipboard operation
echarts copied to clipboard

[Bug] Series symbol rotation is not respected in legends

Open MNHarshitha opened this issue 3 years ago • 2 comments

Version

5.3.0

Link to Minimal Reproduction

https://codepen.io/Harshitha19/pen/RwMRxEd

Steps to Reproduce

  1. Create a scatter series with different symbols, symbolRotation, and enable legends.
  2. Observe that series symbol rotation is not being inherited by the legends symbol.

Current Behavior

Series symbol rotation is not inherited by the legends symbol. image

Expected Behavior

Legends symbol should inherit the series symbol rotation.

Environment

- OS:
- Browser:
- Framework:

Any additional comments?

No response

MNHarshitha avatar Jul 11 '22 09:07 MNHarshitha

Conclusion

Adding a method getLegendIcon() to scatterSeriesModel can solve this problem. Submitting a PR to solve this.

Problem location

More info

Interesting enough, I've found that line series would not have such problem becasue of a judgement here: https://github.com/apache/echarts/blob/add11459ee43a56f7ff5b300c76b3f801f59f3c6/src/component/legend/LegendView.ts#L371 Since the method getLegendIcon() exists only in LineSeriesModel and MapSeries, the judgement is not satisfied for scatter chart so the icons styles are not inheritated.

jiawulin001 avatar Jul 12 '22 03:07 jiawulin001

Hi, This is something we are also looking for the solution. Can I get the status or any suggestions/ workaround in this regard would be much appreciated.

RavalikaP avatar Sep 12 '22 07:09 RavalikaP