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

Long yaxis values crop into label #938

Closed
dbauszus opened this issue Sep 14, 2016 · 5 comments
Closed

Long yaxis values crop into label #938

dbauszus opened this issue Sep 14, 2016 · 5 comments

Comments

@dbauszus
Copy link

In the case of the yaxis value labels being 4 digits long, the value labels overlap with the yaxis title.

image

Here is a jsfiddle to show the problem.

https://jsfiddle.net/goldrydigital/t49y6gf1/

@etpinard
Copy link
Contributor

I can't reproduce this.

This what I'm seeing in your fiddle:

image

Would you mind sharing any other info?

@dbauszus
Copy link
Author

Which browser are you using? I have tested IE, EDGE, Chrome, FireFox. I don't have access to Safari. Perhaps it is working in Safari.

Is there any way to force a distance between the title and the graph?

@etpinard
Copy link
Contributor

Which browser are you using?

I'm using Google Chrome 53.0.2785.101 on Ubuntu 16.04.

Is there any way to force a distance between the title and the graph?

Here's a (hacky) solution using yaxis.tickprefix (don't forget to increase margin.l): https://jsfiddle.net/t49y6gf1/4/

@dbauszus
Copy link
Author

Perfect... That's exactly what I was looking for. Thanks.

@hiteshsahu
Copy link

hiteshsahu commented Jun 16, 2017

You need to add <br\> with the title text

Add <br\> as prefix if you want to add space on top of the title. Add <br\> with a &nbsp; if you want to add space after the title.

  yaxis2: {
          showgrid: false,
          title: 'Condensing Temperature (°F)<br\> <br\><br\><br\>',
          titlefont: {color: '#ff7f0e'},
          tickfont: {color: '#ff7f0e'},
          anchor: 'free',
          overlaying: 'y',
          ticksuffix: ' °F ',
          side: 'left',
          position: -20.,
          fixedrange:true,
          range: [60, 150],
          titlefont: {
             size: 12,
             color: '#7f7f7f'
           },

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

3 participants