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

Horizontal padding (left and right) between labels on xaxis #4893

Open
nolimitdev opened this issue Dec 30, 2024 · 1 comment
Open

Horizontal padding (left and right) between labels on xaxis #4893

nolimitdev opened this issue Dec 30, 2024 · 1 comment
Labels
feature-request New feature or request

Comments

@nolimitdev
Copy link

Labels are automatically hidden when there are too many (hideOverlappingLabels: true ), which is great, but there is no padding set between them. Depending on the device's width, sometimes the labels are readable, and other times they are not because they are completely merged together. How can this issue be resolved?

xaxis : { labels : { rotate : 0, hideOverlappingLabels : true } } }

OK...
01

BAD...
02

@nolimitdev nolimitdev added the feature-request New feature or request label Dec 30, 2024
@nolimitdev
Copy link
Author

Tricky but working solution...

xaxis : {
    labels : {
        formatter : (value) => {
            return '\u00A0\u00A0' + value + '\u00A0\u00A0';
        }
    }
}

It generates <tspan id="...">&nbsp;&nbsp;20241130&nbsp;&nbsp;</tspan>

Maybe it could be officially documented/recommended if better option does not exist.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature-request New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant