Skip to content

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

Open

Description

@SaiKiranTruviz

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 ?

Activity

  1. h-sifat commented on Jan 7, 2024

    @h-sifat

    @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}`)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions