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

X Axis label not displayed when the string is long #5893

Closed
non-javascripter opened this issue Dec 6, 2018 · 3 comments · Fixed by #5922
Closed

X Axis label not displayed when the string is long #5893

non-javascripter opened this issue Dec 6, 2018 · 3 comments · Fixed by #5922
Milestone

Comments

@non-javascripter
Copy link

non-javascripter commented Dec 6, 2018

Expected Behavior

The expected behaviour is to display properly the X axis labels

Current Behavior

The second label is missing

Possible Solution

When the labels are shortened they work correctly, but for longer string they fail

Steps to Reproduce (for bugs)

https://codepen.io/dstoyanov22/live/mQZoEG

Environment

@non-javascripter non-javascripter changed the title X Axis label not displayed X Axis label not displayed when the string is long Dec 6, 2018
@kurkle
Copy link
Member

kurkle commented Dec 7, 2018

You can disable autoSkip:

      scales: {
        xAxes: [{
          ticks: {
            autoSkip: false,
          }
        }]
      }

https://www.chartjs.org/docs/latest/axes/cartesian/

@non-javascripter
Copy link
Author

non-javascripter commented Dec 10, 2018 via email

@simonbrunel
Copy link
Member

This is a bug, I guess with the way we collide rotated labels. autoSkip: false is just a workaround which will not work in many cases. As you can see, the auto skipper should not discard the tick label because it doesn't overlap:

capture

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

Successfully merging a pull request may close this issue.

4 participants