-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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
feat(react-charting): hide overlapping x-axis tick labels #33678
Conversation
📊 Bundle size report✅ No changes found |
Pull request demo site: URL |
change/@fluentui-react-charting-eeb87000-5487-4d1c-9aaf-dc573e669caa.json
Outdated
Show resolved
Hide resolved
e23631c
to
381e599
Compare
…esponsive-charts-v8
...act-charting/src/components/DeclarativeChart/__snapshots__/DeclarativeChartRTL.test.tsx.snap
Show resolved
Hide resolved
packages/charts/react-charting/src/components/CommonComponents/CartesianChart.base.tsx
Show resolved
Hide resolved
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 am seeing an issue with date. |
Yes, I have also noticed that issue. Currently, we calculate the number of ticks that can fit within the container width and pass that value to D3. But D3 often generates a different number of ticks than specified, which is more noticeable on a date axis. To fix this, we can take a similar approach to the string axis - using D3 to generate an initial set of ticks based on a fixed count and then hiding overlapping ticks as the width decreases. |
Cherry-pick of #32829