-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
[charts] Piechart crashes when series is empty #16655
Comments
Hey, @alexbalonperin! Thank you for reporting and for finding the offending line. I've managed to reproduce the issue and I'm working on a fix. |
Thank you so much for the quick reply. |
@alexbalonperin What did you try to run those tests? I have added one with #16657 (comment). Hopefully next time, you will be able to make a PR on your own 😄. Normally, https://github.com/mui/mui-x/blob/master/CONTRIBUTING.md is up to date and is enough to test changes. |
@oliviertassinari Thank you for pointing me at the CONTRIBUTING document.
Anyway, thank you both for jumping in and writing a fix so quickly. |
Hey, @alexbalonperin! The fix has been merged. It should be shipped as part of the next release for MUI X v7. Thank you for your contribution! |
This issue has been closed. If you have a similar problem but not exactly the same, please open a new issue. Note @alexbalonperin How did we do? Your experience with our support team matters to us. If you have a moment, please share your thoughts in this short Support Satisfaction survey. |
Off-topic. @michelengelen This makes me think of Colm's point. The first part of the bot comment is great ![]() but this part: ![]() feels out of place for a MIT issue. This feels Pro/Premium support issues. Not saying we have to remove it, but +1 on my end for a path where we remove this for community issues. |
Steps to reproduce
I am skipping the live example because it's easy to reproduce the issue in a console or any js environment
Steps:
new Array(Math.max(...[]))
Uncaught RangeError: Invalid array length
Current behavior
PieChart crashes when passing an empty series (e.g. []) as argument
Expected behavior
PieChart should show the noDataOverlay when passing an empty series as argument
Context
Show PieChart with dynamic data that may be empty if a set of filters leads to no data for example.
Your environment
npx @mui/envinfo
Search keywords: charts piechart series empty
The text was updated successfully, but these errors were encountered: