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

Legend overlaps the y-axis title #1594

Closed
juni-green opened this issue Apr 13, 2017 · 5 comments
Closed

Legend overlaps the y-axis title #1594

juni-green opened this issue Apr 13, 2017 · 5 comments

Comments

@juni-green
Copy link

juni-green commented Apr 13, 2017

Hi,
Can we adjust the width/height of the legend (containing multiple legend items) to prevent it from being overlapped on y-axis title?
Here is the code which shows multiple y-axes but the legend overlaps the title of second y-axis (at the right side of the graph).

screenshot from 2017-04-13 12 07 32

Any help will be appreciated.
Thanks!

@etpinard
Copy link
Contributor

Can we adjust the width/height of the legend

Short answer: no.

Longer answer: I'm not sure how width/height would help you in this case. What you really need is to input a valid legend.x value like in http://codepen.io/etpinard/pen/WjbNRZ?editors=0010

Alternatively, you can try increasing the right margin (e.g. with `layout.margin.r: 100) and/or make the trace name smaller.

@etpinard
Copy link
Contributor

Closing due to lack of activity after my #1594 (comment)

@juni-green
Copy link
Author

Thanks! It worked. Actually I was thinking to adjust its width and height such that the scrollbar could appear, but your solution worked better.

@legg681
Copy link

legg681 commented Apr 26, 2017

Shouldn't plotly be aware of the second y-Axis and move the legend accordingly automatically?

lleslie84 added a commit to lleslie84/plotly.js that referenced this issue Oct 19, 2017
Address the following issues where the title overlapped the y-axis tick labels or a portion of the title was cutoff
plotly#1504
plotly#296

Might also address:
plotly#1594
@cirosantilli
Copy link

legend below + x axis analogue: #1199

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

4 participants