How can i get a date on hover instead of a number in plotly?
My sample code
require(plotly)
require(tidyverse)
dates <- c("02/27/92", "02/27/92", "01/14/92", "02/28/92", "02/01/92")
dat <- tibble(a = rnorm(5), b = as.Date(dates, "%m/%d/%y"))
p <- dat %>%
ggplot(aes(b, a)) +
geom_line()
ggplotly(p)
Results in:
I would expect b to be Feb 01 instead of 8066. How can i get this?