I am using plotly with r. I am using the hovertext
argument. The hovertext is appearing at the top of my barplot and is conflicting with the plotly options bar at the top making it difficult to read the text.
my_data <-
structure(
list(
flood_freq = "none",
count = 24L,
acres = 67276L,
coiids = "627736, 627737, 627739, 627740, 1153760, 1047375, 1153763, 1153766, 1153765, 1153767, 1122909, 1172713, 1153763, 1153766, 1153765, 1153767, 1122909, 629955, 629956, 629977, 629980, 629982, 629985, 629988"
),
class = c("tbl_df",
"tbl", "data.frame"),
row.names = c(NA,-1L)
)
plot_ly(
x = my_data$flood_freq,
y = my_data$count,
name = "Flood freq. (# components)",
type = "bar",
hoverinfo = "text",
hovertext = paste("coiids: ", stringr::str_wrap(my_data$coiids, 40))
)
I see how I can change the horizontal alignment. R plotly hover label text alignment
How can I change the vertical alignment or come up with another solution that prevents the conflict?