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

Angled x-axis labels that overflow are not scrollable #4076

Open
1 task done
cody-e-sayo-alida opened this issue Jan 23, 2024 · 4 comments
Open
1 task done

Angled x-axis labels that overflow are not scrollable #4076

cody-e-sayo-alida opened this issue Jan 23, 2024 · 4 comments
Labels
bug General bug label

Comments

@cody-e-sayo-alida
Copy link

cody-e-sayo-alida commented Jan 23, 2024

  • I have searched the issues of this repository and believe that this is not a duplicate.

Reproduction link

Edit on CodeSandbox

Steps to reproduce

Place BarChart in ResponsiveContainer and apply overflow: 'scroll' property to the barchart.

What is expected?

The user should be able to scroll and see the angled x-axis labels that are overflowing.

What is actually happening?

There is no scroll functionality.

Environment Info
Recharts v2.10.4
React 17.0.2
System Windows 10 Version 10.0.19045 Build 19045
Browser Chrome, Version 120.0.6099.217 (Official Build) (64-bit)

Setting overflow: 'visible' shows the overflowing labels, but setting overflow to 'scroll' won't work.

@ckifer
Copy link
Member

ckifer commented Jan 23, 2024

Lots of duplicates

#1364
#1364
#1761
#3059

@ckifer ckifer added the bug General bug label label Jan 23, 2024
@ckifer
Copy link
Member

ckifer commented Jan 23, 2024

Ah this isn't horizontal scroll, you want to scroll vertically.

This can be looked into more, not sure why that doesn't work.

A workaround could be to have dynamic margin based on label size (though I know that can be painful)

@cody-e-sayo-alida
Copy link
Author

Thank you, scrolling would be preferable over dynamic margins

@ckifer
Copy link
Member

ckifer commented Jan 24, 2024

I tried to do some different things to no avail today. Might need to read up a little more on how overflow:scroll works in SVGs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug General bug label
Projects
None yet
Development

No branches or pull requests

2 participants