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 Marker Vertical Alignment #2798

Closed
bpostlethwaite opened this issue Jul 10, 2018 · 2 comments
Closed

Legend Marker Vertical Alignment #2798

bpostlethwaite opened this issue Jul 10, 2018 · 2 comments
Assignees

Comments

@bpostlethwaite
Copy link
Member

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

@etpinard
Copy link
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(' ')
},

@etpinard
Copy link
Contributor

cc @antoinerg

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

No branches or pull requests

3 participants