Back in 2018, a similar question was raised (see: Is there way to change hovertext in plotly)
However, my issue involves additional formatting of the 'text' parameter within ggplot that causes the plot to become malformed.
The following code demonstrates the problem.
library(plotly) theData <- filter(txhousing, city == "Abilene") p <- ggplot(theData) + geom_line(aes(date, median, text = paste0(city, ", TX", "<br>", median))) pp <- ggplotly(p, tooltip = "text") print (pp)
Notice how the runchart doesn't connect the points anymore, but horizontal lines of points that have the same value are connected. Remove the last 'median' in the 'text =' line and the problem doesn't occur.