Hello! I'm creating plots using the ts function in R and am running into problems when I try and use plotly. What I'm trying to do is change the hover over options so that when I run it in my app, it at least makes sense on what the viewer is looking at. At the moment, when I hover over a dot it shows" X:2022.000, Y:1857.
I fully understand that it is only looking at what the dataset is but how would I change it so that it shows Year: 2022, Count:1857. Below is the dataset using the ts function.
# Time Plot
# Shows basic line graph
L <- autoplot(Y) + # quick function for plotting line graph
ggtitle("Counts by Months") + # main title
#ylab("Count") + # y coordinate title
#xlab("Months in a Year") + # x coordinate title
geom_line(size = 1, color = "#ffffff") +
geom_point(color = "#ffffff") +
geom_smooth() +
scale_y_continuous(limits = c(0, NA), expand = c(0,0)) +
theme_minimal() +
theme(panel.border = element_rect(color = "#ffffff",
fill = NA,
size = 1)) +
theme(axis.title.x = element_blank(),
axis.title.y = element_blank())