apache / echarts

Apache ECharts is a powerful, interactive charting and data visualization library for browser
https://echarts.apache.org
Apache License 2.0
60.58k stars 19.61k forks source link

[Bug] Use dataset for multiple series pie chart, render wrong #19262

Open zhoudaxia2016 opened 1 year ago

zhoudaxia2016 commented 1 year ago

Version

5.4.3

Link to Minimal Reproduction

https://echarts.apache.org/examples/en/editor.html?c=bar-polar-label-tangential&code=PYBwLglsB2AEC8sDeAoWsAmBDMWDOApmAFzJrqx7ACuATgMYGkDa5FszA5LJwDQ9Y-PAEacAurzYUuANywAbagQCMQ5fwDMEqelkKlAJiEH-BsVPPoAvpPSFaEAnhZTU7dNCwBbJgL47YMABPEF9OEEd_d1haLAwIamcOTgBWAFIhTg108VsKG1cAzx9STnoo92DQ0oiCCvZY-MSWTgA2AAYM_k5lds7cqStycysAbiA

Steps to Reproduce

Open the Minimal Reproduction link.

Current Behavior

https://echarts.apache.org/examples/en/editor.html?c=bar-polar-label-tangential&code=PYBwLglsB2AEC8sDeAoWsAmBDMWDOApmAFzJrqx7ACuATgMYGkDa5FszA5LJwDQ9Y-PAEacAurzYUuANywAbagQCMQ5fwDMEqelkKlAJiEH-BsVPPoAvpPSFaEAnhZTU7dNCwBbJgL47YMABPEF9OEEd_d1haLAwIamcOTgBWAFIhTg108VsKG1cAzx9STnoo92DQ0oiCCvZY-MSWTgA2AAYM_k5lds7cqStycysAbiA bar-polar-label-tangential (1)

Expected Behavior

https://echarts.apache.org/examples/en/editor.html?c=bar-polar-label-tangential&code=PYBwLglsB2AEC8sDeAoWsDOBTAThLGAXLANprrLkWzQCGAtlsQOS3MA0VFYAniE7GYh8HLugAmtMLWIkkAN1oAbAK4CAjOxoMBzRaqzrmAXy0Lla4gCYtdRi31qrJgLqdq6HLXEQVRUswArACkHIIAzCHMblymXKge2vaCAEaiibz8LMJY6R6S0rLmBsThtjoOFoYmZo4CNkm6dc7GMYlePn6yzABsAAyhWszqfQPR7hTG5C4oxgDcQA bar-polar-label-tangential

Environment

- OS:
- Browser:
- Framework:

Any additional comments?

Do I generate a wrong dataset.source? I know I can use series.data to achieve this,but I want all my charts use the same dataset option to generate data. I also find out that I can use dataset with series.encode, but I want to figure it out whether it's a bug or not.

helgasoft commented 1 year ago

I want all my charts use the same dataset option to generate data.

possible with a multi-dataset - demo NB: please close issue if problem solved.

zhoudaxia2016 commented 1 year ago

I want all my charts use the same dataset option to generate data.

possible with a multi-dataset - demo NB: please close issue if problem solved.

I want to avoid changing the dataset and wonder why one dataset can not achieve this.

helgasoft commented 1 year ago

I want to avoid changing the dataset and wonder why one dataset can not achieve this.

it can, but you need to use encode - demo

I also find out that I can use dataset with series.encode, but I want to figure it out whether it's a bug or not.

not-a-bug, series default layout is by 'column', so you need to use encode to assign different columns to multiple series.

zhoudaxia2016 commented 1 year ago

I want to avoid changing the dataset and wonder why one dataset can not achieve this.

it can, but you need to use encode - demo

I also find out that I can use dataset with series.encode, but I want to figure it out whether it's a bug or not.

not-a-bug, series default layout is by 'column', so you need to use encode to assign different columns to multiple series.

All the other charts's series default layout is by 'column' too. Why pie chart is different?

helgasoft commented 1 year ago

Agree, pie chart is different. Maybe the others (line,bar..) have been "optimized" and pie hasn't. But still, a missing feature is not a bug.