Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Two layered pie chart issue in case of only 1 data point #637

Closed
yizheliu-amazon opened this issue Apr 18, 2020 · 5 comments · Fixed by #643
Closed

Two layered pie chart issue in case of only 1 data point #637

yizheliu-amazon opened this issue Apr 18, 2020 · 5 comments · Fixed by #643
Labels
bug Something isn't working :partition Partition/PieChart/Donut/Sunburst/Treemap chart related released Issue released publicly

Comments

@yizheliu-amazon
Copy link

Describe the bug
Hi Elastic/Kibana developers,

I’m seeing a bug with rendering in Kibana when I’m using a 2 layered sunburst/pie chart with a single data point for the chart. The label of the outer circle overlaps with the inner circle.

To Reproduce
Steps to reproduce the behavior:

  1. Change line 29 to data={[mocks.sunburst[0]]}
  2. Open local url: http://localhost:9001/?path=/story/sunburst--sunburst-with-two-layers
  3. You will see label of inner and outer circle overlaps with each other, as show in Screenshot 1

Expected behavior
Labels of 2 layers sunburst/pie chart in case of only 1 data point should be clearly visible.

Screenshots
Screenshot 1:
Screen Shot 2020-04-17 at 12 43 47 PM

Screenshot 2:
Screen Shot 2020-04-17 at 12 46 51 PM

Version (please complete the following information):

  • OS: macOS High Sierra
  • Browser: chrome
  • Elastic Charts: 18.2.2

Additional context
I tried to avoid this issue to display both labels properly by making change to the linkLabel config as below:

linkLabel: {
    // maxCount: 0,
    fontSize: 14,
    maximumSection: Infinity,
},

And then go to URL in step 2, you will see the label of inner circle is invisible, as shown in Screenshot 2.

Errors in browser console
N/A

Kibana Cross Issues
N/A

How do I display the labels of 2 layers sunburst/pie chart in case of only 1 data point?

Thanks for your help.

@yizheliu-amazon yizheliu-amazon added the bug Something isn't working label Apr 18, 2020
@markov00 markov00 added the :partition Partition/PieChart/Donut/Sunburst/Treemap chart related label Apr 21, 2020
@markov00
Copy link
Member

Hi @yizheliu-amazon, thanks for issuing the ticket.
Unfortunately, this is a known bug, it can be also visible here https://elastic.github.io/elastic-charts/?path=/story/sunburst--single-sunburst

@monfera do you see any workaround for that issue that can be used before we release the fix?

@monfera
Copy link
Contributor

monfera commented Apr 21, 2020

There's no good workaround for now - while it's possible to add an artificial, vanishingly small but nonzero-valued slice to prevent the special layouting for the single-valued case, it'll still show up in the legend. However it's a small fix so it could be part of the next release

@yizheliu-amazon
Copy link
Author

Thanks for your comments. @markov00 @monfera .

Could you please let me know when next version will be released?

markov00 pushed a commit that referenced this issue Apr 22, 2020
This commit fix the partition chart avoiding filling a single slice
if the inner radius is nonzero.

fix #637
markov00 pushed a commit that referenced this issue Apr 22, 2020
# [18.4.0](v18.3.0...v18.4.0) (2020-04-22)

### Bug Fixes

* **partition:** single slice wrong text positioning ([#643](#643)) ([6298d36](6298d36)), closes [#637](#637)
* **treemap:** align onElementClick parameters to sunburst ([#636](#636)) ([2c1d224](2c1d224)), closes [#624](#624)

### Features

* allow colorVariant option for series specific color styles ([#630](#630)) ([e5a206d](e5a206d))
* **series:** BubbleSeries (alpha) and markSizeAccessor ([#559](#559)) ([3aa235e](3aa235e))
@markov00
Copy link
Member

🎉 This issue has been resolved in version 18.4.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

@markov00 markov00 added the released Issue released publicly label Apr 22, 2020
@yizheliu-amazon
Copy link
Author

Sorry for late reply. Thank you for the fix!

AMoo-Miki pushed a commit to AMoo-Miki/OpenSearch-Dashboards that referenced this issue Feb 10, 2022
# [18.4.0](elastic/elastic-charts@v18.3.0...v18.4.0) (2020-04-22)

### Bug Fixes

* **partition:** single slice wrong text positioning ([opensearch-project#643](elastic/elastic-charts#643)) ([f8b5b8a](elastic/elastic-charts@f8b5b8a)), closes [opensearch-project#637](elastic/elastic-charts#637)
* **treemap:** align onElementClick parameters to sunburst ([opensearch-project#636](elastic/elastic-charts#636)) ([8dd87bf](elastic/elastic-charts@8dd87bf)), closes [opensearch-project#624](elastic/elastic-charts#624)

### Features

* allow colorVariant option for series specific color styles ([opensearch-project#630](elastic/elastic-charts#630)) ([e2444ef](elastic/elastic-charts@e2444ef))
* **series:** BubbleSeries (alpha) and markSizeAccessor ([opensearch-project#559](elastic/elastic-charts#559)) ([85d9bda](elastic/elastic-charts@85d9bda))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working :partition Partition/PieChart/Donut/Sunburst/Treemap chart related released Issue released publicly
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants