Skip to content

Inconsistent spacing between legend marker and legend title #881

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
CalvinFernandez opened this issue Aug 25, 2016 · 4 comments
Closed

Inconsistent spacing between legend marker and legend title #881

CalvinFernandez opened this issue Aug 25, 2016 · 4 comments

Comments

@CalvinFernandez
Copy link

image

image

Would it be possible to make spacing between legend and marker consistent based on marker size?

@etpinard
Copy link
Contributor

etpinard commented Sep 1, 2016

Thanks for the suggestion.

I'm not sure exactly what you mean by marker consistent based on marker size? You mean the Central Park Zoo and Bronx Zoo text in the above screenshot should be placed closer to the marker items?

But, consider this legend

image

by moving trace 3 closer to the square marker, trace 3 would be misaligned with the items above it.

@CalvinFernandez
Copy link
Author

@etpinard yes this is a good point, perhaps we could apply spacing such that the legend text is aligned and the minimum is always consistent?

@etpinard
Copy link
Contributor

etpinard commented Sep 9, 2016

perhaps we could apply spacing such that the legend text is aligned and the minimum is always consistent?

Maybe a below solution would be to add a set of attribute determining the legend item text position offset (in pixels). For example,

var layout = {
  legend: {
     xtextoffset: -1, // for all items OR [0,0,-1, /* .. */] to offset each item independently 
     ytestoffset: 0   // similarly
  }
}

@gvwilson
Copy link
Contributor

gvwilson commented Jun 5, 2024

Hi - this issue has been sitting for a while, so as part of our effort to tidy up our public repositories I'm going to close it. If it's still a concern, we'd be grateful if you could open a new issue (with a short reproducible example if appropriate) so that we can add it to our stack. Cheers - @gvwilson

@gvwilson gvwilson closed this as completed Jun 5, 2024
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