-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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] Allow to skip animation on sparkline bar #12160
Conversation
Deploy preview: https://deploy-preview-12160--material-ui-x.netlify.app/ Updated pages: |
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.
LGTM. 👌
Have you considered adding a section about animation in the docs? 🤔
@@ -101,6 +101,12 @@ export interface SparkLineChartProps | |||
* } | |||
*/ | |||
margin?: Partial<CardinalDirections<number>>; | |||
/** | |||
* If `true`, bar animations are skiped. | |||
* @deprecated In v7 animation are skiped for sparkline. |
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.
* @deprecated In v7 animation are skiped for sparkline. | |
* @deprecated In v7 animations are skipped for sparkline. |
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.
by default.
It's not exactly by default, they are just removed, assuming nobody needs it. We could add a props enableAnimation
in v7 but for now it does not exist
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.
Gotcha. Updated the suggestion. 😉
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 was mostly to make sure you are not choked that v7 removes this feature ;)
Yes but this feature will be removed in a month, and the feature is in the API of the component |
Fix #12152
The bar animation has been added by error in sparkline with #9926 in the v6.0.0-alpha.16.
For v7 it has been removed by #11311
Since the behavior is here since the beginning of v6.0.0 I propose to add the
skipAnimation
props to sparkline to keep the same default as before, and keep v7 as it is