mui / mui-x

MUI X: Build complex and data-rich applications using a growing list of advanced React components, like the Data Grid, Date and Time Pickers, Charts, and more!
https://mui.com/x/
3.85k stars 1.15k forks source link

[charts] Fix area order when overlapping #13121

Closed alexfauquette closed 2 weeks ago

alexfauquette commented 2 weeks ago

Fix #13067

I would still discourage the use of overlapping areas except for very specific edge case (such the one in the issue) 🙈

With no structure

image

With guarantee some series are always smaller than others

image

I introduced this reverse when creating the animation, otherwise you get a weird state with the line and the area not in sync, just because the area on top of you is overlapping (the time it finishes its animation too)

This fix applies the reverse on staking groups instead of all series.

mui-bot commented 2 weeks ago

Deploy preview: https://deploy-preview-13121--material-ui-x.netlify.app/

Generated by :no_entry_sign: dangerJS against edec33188b5b55e8f45fcd64c0f90d91f931086d