-
-
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] Allow tickLabelPlacement='middle'
in continuous scales
#16803
base: master
Are you sure you want to change the base?
Conversation
Deploy preview: https://deploy-preview-16803--material-ui-x.netlify.app/ Updated pages: |
CodSpeed Performance ReportMerging #16803 will not alter performanceComparing Summary
|
Tried using bar chart and band. But I'm unsure if the changes are sane. f8b984a Looks good though |
@@ -218,6 +218,15 @@ To avoid overlapping, you can use the `height` prop for `xAxis` and `width` for | |||
|
|||
{{"demo": "MultipleAxes.js"}} | |||
|
|||
### Overlapping axes | |||
|
|||
In order to overlap axes, the axis size can be set to `0`. |
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.
This feels a bit like a workaround. In this PR we're going to start taking the size into account and it will cause the labels to be hidden:
Should we consider a less hacky API? E.g., translating the second axis.
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.
We can also just drop this if it is too much. Translating the axis will still make the axis count into the sizes though
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 see some value in this example, so it might make sense to have it in the docs. However, we should probably use a custom component for it, or another workaround, since this one will break in the short term.
👻
tickLabelPlacement='middle'
in continuous scalesAxisValueFormatterContext
which wasn't previously exportedChangelog
tickLabelPlacement='middle'
on continuous scales as well as 'band' scale.