Data Frame:
df2 = data.frame(value = c(10,10,10,10,10),
key = c('ar', 'or', 'br', 'gt', 'ko'))
Plotly code:
df2 %>%
plot_ly(y = ~value,
x = ~key,
type = 'bar',
hoverinfo = 'text',
hovertext = paste0('this is a pretty huge text',
'\nand I would like to set the correct',
'\nposition of the hoverlabel, so it',
"\nwon't cover the title.",
'\n\nAlso, I would like to position it in the',
'\nmiddle of the bar, if possible')) %>%
layout(title = list(text = "This is the Title I don't want to be covered",
y = 0.98))
Basically, I have a pretty huge hoverinfo
in the hoverlabel, but it's covering the title
. I would like to position it in the middle of the yaxis
, so I can keep reading either the title and the hoverinfo. Any tips here?