-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
[charts] Handle domain edge cases with filterMode: 'discard'
#19199
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] Handle domain edge cases with filterMode: 'discard'
#19199
Conversation
|
Deploy preview: https://deploy-preview-19199--material-ui-x.netlify.app/ Bundle size report
|
CodSpeed Performance ReportMerging #19199 will improve performances by 8.62%Comparing Summary
Benchmarks breakdown
Footnotes |
| const skipAxisRendering = position === 'none'; | ||
| const skipTickRendering = | ||
| (isScaleBand && domain.length === 0) || (!isScaleBand && domain.some(isInfinity)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can't we simply revert all these axis changes? It seems unnecessary, and would technically create a breaking change, wouldn't it simply work as it currently does if we remove them?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It isn't unnecessary.
Without it, a zoomed area without any data points will hide the axis:
Screen.Recording.2025-09-09.at.08.57.51.mov
With it, only the ticks will be hidden. The axis will still render:
Screen.Recording.2025-09-09.at.08.58.17.mov
would technically create a breaking change
That's true, but I think we can work around that. I'll try to see what I can do.
filterMode: 'discard'filterMode: 'discard'
|
This pull request has conflicts, please resolve those before we can evaluate the pull request. |
07f0ed3 to
71c58ac
Compare
5183d1c to
4d97569
Compare
e4deca7 to
3893f66
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a small comment on the formatting for the edge case
Related to #18999.
Handle domain edge cases with
filterMode: 'discard'.Screen.Recording.2025-08-15.at.15.42.47.mov
A consequence of this change is that we'll now render the axis line when there's no data:
If that isn't acceptable, we can add a special case for it.