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

Axes labels width/height ignores first and last ticks labels #1729

Open
sepnon opened this issue Dec 18, 2019 · 0 comments
Open

Axes labels width/height ignores first and last ticks labels #1729

sepnon opened this issue Dec 18, 2019 · 0 comments

Comments

@sepnon
Copy link

sepnon commented Dec 18, 2019

On jquery.flot.js, function measureTickLabels, the following if statement
if (!t.label || (showMajorTickLabels === false && i > 0 && i < ticks.length - 1) || (showEndpointsTickLabels === false && (i === 0 || i === ticks.length - 1))) { continue; }
ignores the first and last ticks when showEndpointsTickLabels is false.
The default opts.showTickLabels is "major", so showEndpointsTickLabels becomes false.

A plot with the last tick having a longer text gets clipped.
The same problem happens with axes with only one or two tick labels, such as the horizontal axis of a barchart with a single bar.

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

No branches or pull requests

1 participant