You have to replace [ tooltip="text" ] with [ hoverinfo="text" ], and you also have to declare the variable [ text=... ], e.g. one of your columns or a custom vector
Here, hoverinfo="text" is optional. If you don't declare it, the tooltip will display the coordinates in addition to the text.
Here a complete example:
library(plotly)
dt <- data.frame(
fruits=c("apple","lemon","orange"),
rank=c(1,2,4)
)
p <- plot_ly(dt, x = ~fruits, y = ~rank,
type = 'scatter', mode = 'markers',
text = ~fruits, hoverinfo="text")
p