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

Pie Chart disappears when the value of one slice is massively larger than the others #1975

Open
rstedman opened this issue Oct 23, 2024 · 0 comments
Labels

Comments

@rstedman
Copy link

Describe the bug
When a pie chart has a couple of slices and the value of one slice is orders of magnitudes larger than the other slice to the point that there would be no room to draw the smallest slice (ex. 5 million times larger), the larger slice disappears.

To Reproduce
This can be reproduced in the demo project from this repository.

  1. edit src/app/data.ts and change the single const to:
export const single: SingleSeries = [
  {
    name: 'Germany',
    value: 18,
    extra: {
      code: 'de'
    }
  },
  {
    name: 'United States',
    value: 83333334,
    extra: {
      code: 'us'
    }
  }
];
  1. Run npm start, launch a browser to http://localhost:4200/ and switch to the pie chart demo.
  2. See below gif for behavior

Expected behavior
The pie chart slice remains visible

Screenshots
pie-chart-bug

ngx-charts version
Specify the version of ngx-charts where this bug is present

Additional context
Add any other context about the problem here.

@rstedman rstedman added the Bug label Oct 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants
@rstedman and others