amcharts / amcharts5

The newest, fastest, and most advanced amCharts charting library for JavaScript and TypeScript apps.
Other
359 stars 96 forks source link

Issue of Pie of pie chart slice display when selected #944

Closed cooldammy closed 1 year ago

cooldammy commented 1 year ago

Bug description

Adopted from the official demo code of pie of pie chart. If the size of subData from the very first set of series data is less than others, then the pie misses some share of subData. For example in the codpen below, select the "Ireland" slice after rendering, you will see B/C share are 0% respsctively. Moreover, after you select the slice with the maximum size of subData, the share display becomes normal as expected.

Check the code mentioned above in https://codepen.io/tsungming-liao/pen/MWPNJNy

zeroin commented 1 year ago

Switching setIndex with show() should fix the problem: https://codepen.io/team/amcharts/pen/jOegvLW/3aec39970ad2d6d414296ce9a53dc56e

cooldammy commented 1 year ago

Hi @zeroin , thank you for your tips. It now works normal after adjusting the order of setIndex and show(). The show() should precede the setIndex method.

github-actions[bot] commented 1 year ago

This issue is stale because it has been open 30 days with no activity. It will be closed in 5 days unless a new comment is added.