Skip to content

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

@yizheliu-amazon

Description

@yizheliu-amazon

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    :partitionPartition/PieChart/Donut/Sunburst/Treemap chart relatedbugSomething isn't workingreleasedIssue released publicly

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions