Plotly.js: Multi-line "extra" hover label alignment is off

Created on 17 Jan 2019  路  7Comments  路  Source: plotly/plotly.js

Most helpful comment

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

Pushed to https://github.com/plotly/plotly.js/pull/3443

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

Now in https://github.com/plotly/plotly.js/issues/3010

All 7 comments

Would something like:

peek 2019-01-18 10-57

look good enough?

Maybe valign the value? :p

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

Maybe valign the value? :p

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

Otherwise it looks OK! :) Thanks a bunch

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.

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

Pushed to https://github.com/plotly/plotly.js/pull/3443

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

Now in https://github.com/plotly/plotly.js/issues/3010

Was this page helpful?
0 / 5 - 0 ratings