Skip to content

Horizontal legend disappears depending on length of series names #4986

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

Closed
fredrikw opened this issue Jul 7, 2020 · 10 comments
Closed

Horizontal legend disappears depending on length of series names #4986

fredrikw opened this issue Jul 7, 2020 · 10 comments

Comments

@fredrikw
Copy link

fredrikw commented Jul 7, 2020

I have a graph with a horizontally oriented legend that shows a strange problem. When the total length of the legend is "exactly right" the clip path in the resulting svg gets distorted so that most of the legend is clipped of. See the following CodePen where the first plot is the problematic one. Adding or removing one character in the series names make the legend show correctly as seen in plots two and three.

https://codepen.io/fredrikwa/pen/NWxYXba

@fredrikw
Copy link
Author

fredrikw commented Sep 7, 2020

I created a PR in my fork as per above. Please review and see if it is acceptable.

@fredrikw
Copy link
Author

Maybe @alexcjohnson or @archmoj would like to look at it?

@archmoj
Copy link
Contributor

archmoj commented Sep 10, 2020

Looks good. Could you open a PR to plotly.js repo?

@fredrikw
Copy link
Author

Sure, should I merge in the upstream master first?

@archmoj
Copy link
Contributor

archmoj commented Sep 10, 2020

No it doesn't look necessary.

@fredrikw
Copy link
Author

PR submitted

@archmoj
Copy link
Contributor

archmoj commented Sep 10, 2020

@fredrikw
I didn't notice any difference between the Before vs After codepens using the build from #5139.
Do you see any changes?
If so please mention which operating system and browser you use.
Thanks!

@fredrikw
Copy link
Author

Yes, I see a difference, see attachments:
image
image

I'm using Chrome 85.0.4183.83 on Windows 10

@archmoj
Copy link
Contributor

archmoj commented Sep 11, 2020

Thanks @fredrikw.
I confirm the difference is notable using Chrome 85 on Windows 10.

@archmoj
Copy link
Contributor

archmoj commented Sep 11, 2020

Closed via #5139.

@archmoj archmoj closed this as completed Sep 11, 2020
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

2 participants