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

Label Rotate start too late, after they start overlapping #1799

Open
SaiKiranTruviz opened this issue Jul 21, 2023 · 1 comment
Open

Label Rotate start too late, after they start overlapping #1799

SaiKiranTruviz opened this issue Jul 21, 2023 · 1 comment

Comments

@SaiKiranTruviz
Copy link

SaiKiranTruviz commented Jul 21, 2023

I am using axisLabelRotate
Here the rotation start way too late after the labels are overlapped each other.
image
image

How can we fix this ?
@ColinEberhardt Can you suggest something ?

@h-sifat
Copy link

h-sifat commented Jan 7, 2024

@SaiKiranTruviz I faced the same problem.

After some trying, I've come up with a hack to get around the problem. If you pad the tick labels with some non-breaking space then the labels don't collide anymore.

const padding = /* nbsp */ "\u00A0".repeat(4);
const xAxis = d3.axisBottom(xScale)
    .tickFormat((value) => `${padding}${value}${padding}`)

@cfisher-scottlogic cfisher-scottlogic added this to the Triage issues milestone Apr 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants