Skip to content
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] Fix tickLabelInterval not working on YAxis #12746

Conversation

JCQuintas
Copy link
Member

@JCQuintas JCQuintas commented Apr 11, 2024

  • Start using tickLabelInterval to determine which labels should be skipped
  • Fix small typos

You can test it here: https://codesandbox.io/p/sandbox/mui-mui-x-x-data-grid-forked-lhvxqm?file=%2Fsrc%2Fdemo.tsx%3A161%2C1

fixes #12725

@JCQuintas JCQuintas added bug 🐛 Something doesn't work component: charts This is the name of the generic UI component, not the React module! labels Apr 11, 2024
@JCQuintas JCQuintas marked this pull request as ready for review April 11, 2024 12:48
@mui-bot
Copy link

mui-bot commented Apr 11, 2024

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

Generated by 🚫 dangerJS against 3e97869

Copy link
Member

@alexfauquette alexfauquette left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good.

Just wondering why not having the same strategy in both components.

The <XChartsAxis /> uses the tickLabelInterval in the addLabelDimension and the <YChartAxis /> do it in the rendering.

I don't have preferences between the two way, but could be nice to the same thing the same way in both components to simplify the maintainance

@JCQuintas
Copy link
Member Author

I couldn't find anything similar to addLabelDimension in the YChartAxis, the logic in both of them are very different from what I can tell.

@alexfauquette
Copy link
Member

I couldn't find anything similar to addLabelDimension in the YChartAxis, the logic in both of them are very different from what I can tell.

My bad, I forgot that the Y axis do not manage the the text size for now

@JCQuintas JCQuintas merged commit ec2df5c into mui:master Apr 12, 2024
18 of 19 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🐛 Something doesn't work component: charts This is the name of the generic UI component, not the React module!
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[charts] tickLabelInterval does not work for left, right or y axes in barChart
3 participants