Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR R

ggplot in R how to show information by hovering

p <- ggplot(data = df, aes(x = Date, y = Revenue, group = 1,
            text = paste("Date: ", Date,
                         "<br>Revenue: $", Revenue,
                         "<br>Target: $", Target)
)) +
   geom_line(colour = "grey", aes(Date, Target)) +
   geom_line(colour = "#408FA6")
ggplotly(p, tooltip = "text")
Source by www.musgraveanalytics.com #
 
PREVIOUS NEXT
Tagged: #ggplot #R #show #information #hovering
ADD COMMENT
Topic
Name
1+8 =