Skip to content

Inconsistent spacing between legend marker and legend title #881

Description

@CalvinFernandez

image

image

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

Activity

  1. etpinard commented on Sep 1, 2016

    @etpinard
    Contributor

    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.

  2. CalvinFernandez commented on Sep 8, 2016

    @CalvinFernandez
    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?

  3. etpinard commented on Sep 9, 2016

    @etpinard
    Contributor

    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
      }
    }
  4. gvwilson commented on Jun 5, 2024

    @gvwilson
    Contributor

    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

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions