-
-
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] Improve axis size docs #16673
Conversation
Deploy preview: https://deploy-preview-16673--material-ui-x.netlify.app/ Updated pages: |
CodSpeed Performance ReportMerging #16673 will not alter performanceComparing Summary
|
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.
Nice one. I proposed to split the explaination a bit differently to avoid some confusion about the fact we could be able to compute the axis size
docs/data/charts/styling/styling.md
Outdated
|
||
You might want to modify those values to leave more space for your axis ticks or reduce them to provide more space for the data. | ||
To define the axis size, you can use the `xAxis` and `yAxis` configuration. The size is only take into account if the axis has a position different from `none`. |
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.
To define the axis size, you can use the `xAxis` and `yAxis` configuration. The size is only take into account if the axis has a position different from `none`. | |
The axes have a default size. | |
To update it, use the `xAxis` and `yAxis` configuration as follow: | |
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.
Should it be "as follows" instead of "as follow"?
docs/data/charts/styling/styling.md
Outdated
- **`y-axis`**: Uses the `width` prop instead. | ||
|
||
{{"demo": "MarginNoSnap.js", "hideToolbar": true, "bg": "playground"}} |
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.
I propose to move this note after the demo to avoid creating confusion for the reader
- **`y-axis`**: Uses the `width` prop instead. | |
{{"demo": "MarginNoSnap.js", "hideToolbar": true, "bg": "playground"}} | |
- **`y-axis`**: Uses the `width` prop instead. | |
Axes that should not be displayed (for example those with `position: 'none'`) are ignored. | |
{{"demo": "MarginNoSnap.js", "hideToolbar": true, "bg": "playground"}} |
- **`y-axis`**: Uses the `width` prop instead. | |
{{"demo": "MarginNoSnap.js", "hideToolbar": true, "bg": "playground"}} | |
- **`y-axis`**: Uses the `width` prop instead. | |
Axes that should not be displayed (for example those with `position: 'none'`) do not take up any space, regardless of their size. | |
{{"demo": "MarginNoSnap.js", "hideToolbar": true, "bg": "playground"}} |
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
Axes that should not be displayed (for example those with
position: 'none'
) are ignored.
do we mean that axes that should not be displayed will ignore the size they're given?
If so, I suppose the following formulation might be clearer: "Axes that should not be displayed (for example those with position: 'none'
) do not take up any space, regardless of their size."
What do you think?
Co-authored-by: Bernardo Belchior <[email protected]> Signed-off-by: Jose C Quintas Jr <[email protected]>
I've re-written some of your suggestions to what I feel make them clearer, but let me know what you think of the re-wording 😄 |
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.
Minor suggestions, looks good!
Co-authored-by: Bernardo Belchior <[email protected]> Signed-off-by: Jose C Quintas Jr <[email protected]>
Co-authored-by: Bernardo Belchior <[email protected]> Signed-off-by: Jose C Quintas Jr <[email protected]>
styling.md
file to include explanations of the new axis size properties and how they affect chart layout.