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

Multi-line "extra" hover label alignment is off #3442

Closed
etpinard opened this issue Jan 17, 2019 · 7 comments
Closed

Multi-line "extra" hover label alignment is off #3442

etpinard opened this issue Jan 17, 2019 · 7 comments
Assignees
Labels
bug something broken

Comments

@etpinard
Copy link
Contributor

Pulled out of @Braintelligence's #3175 (comment)

grafik

or simply in https://codepen.io/etpinard/pen/QzRzBe

@etpinard
Copy link
Contributor Author

Would something like:

peek 2019-01-18 10-57

look good enough?

@etpinard etpinard self-assigned this Jan 18, 2019
@Braintelligence
Copy link

Maybe valign the value? :p

@etpinard
Copy link
Contributor Author

Example of a more extreme case:

Plotly.newPlot('graph', [{
  y: [1, 2, 1],
  name: 'Multi<br>line<br>trace<br>name',
  hoverlabel: {namelength: -1},
  hoverinfo: 'x+y+name'
}, {
  y: [1, 2, 1],
  name: 'Multi<br>line<br>trace<br>name',
  hoverinfo: 'x+y+name',
  hoverlabel: {namelength: -1}
}], {
  showlegend: true
})

peek 2019-01-18 11-01

@etpinard
Copy link
Contributor Author

Maybe valign the value? :p

That could work. @plotly/plotly_js any thoughts on this?

@Braintelligence
Copy link

Otherwise it looks OK! :) Thanks a bunch

@alexcjohnson
Copy link
Collaborator

Currently multiline primary text with a single-line name leaves the name top-aligned with the text box, which makes me think the default with more lines in the name than in the primary text should be the same, top-aligned. But an attribute to switch that to middle-aligned or bottom-aligned would be great to add at some point.

@etpinard
Copy link
Contributor Author

makes me think the default with more lines in the name than in the primary text should be the same

Pushed to #3443

But an attribute to switch that to middle-aligned or bottom-aligned would be great to add at some point.

Now in #3010

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

No branches or pull requests

3 participants