Skip to content

Legend Marker Vertical Alignment #2798

Closed

Description

@bpostlethwaite

A feature request has been made for legend marker alignment relative to legend trace names.

In the case where legend trace names are multi-line the request is to have options for marker vertical alignment. In this example the marker would align with the first legend text line when set to "top".

image

Activity

  1. added
    feature
    on Jul 10, 2018
  2. etpinard commented on Sep 26, 2018

    @etpinard
    Contributor

    Adding a legend-wide attribute should suffice. I'd vote for layout.legend.align or layout.legend.valign similar to what annotations/ uses:

    align: {
    valType: 'enumerated',
    values: ['left', 'center', 'right'],
    dflt: 'center',
    role: 'style',
    editType: 'arraydraw',
    description: [
    'Sets the horizontal alignment of the `text` within the box.',
    'Has an effect only if `text` spans more two or more lines',
    '(i.e. `text` contains one or more <br> HTML tags) or if an',
    'explicit width is set to override the text width.'
    ].join(' ')
    },
    valign: {
    valType: 'enumerated',
    values: ['top', 'middle', 'bottom'],
    dflt: 'middle',
    role: 'style',
    editType: 'arraydraw',
    description: [
    'Sets the vertical alignment of the `text` within the box.',
    'Has an effect only if an explicit height is set to override',
    'the text height.'
    ].join(' ')
    },

  3. etpinard commented on Nov 12, 2018

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

Metadata

Metadata

Assignees

Labels

feature

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions