Open ignacio82 opened 9 years ago
+1 -- would love to add a horizontal line, too!
Hey! This functionality (horizontal and vertical lines) is currently provided with the annotations plugin. Unfortunately until https://github.com/hrbrmstr/taucharts/issues/64 is solved, there isn't an easy way to produce anything but dotted lines.
Hope this helps! /j
data <- data.frame(date = seq(Sys.Date(), Sys.Date() - 9, length.out = 10), revenue = rpois(10, 50))
tauchart(data) %>%
tau_point("date", "revenue") %>%
tau_guide_x(tick_format = "%d.%m") %>%
tau_annotations(data.frame(dim = "date", val = data$date,
text = "Another day", position = "front",
color = '#4300FF'))
Thanks very much. Your example making multiple lines works well for me. FYI this code in the tau_annotations
help file does not appear to be adding one single line to each plot (at least for me):
data(cars_data)
tauchart(cars_data) %>%
tau_point("milespergallon", c("class", "price"), color="class") %>%
tau_annotations(data.frame(dim = "y", val = 50000,
text = "Whoa there!", position = "front",
color = '#4300FF'))
I know, sorry! It's fixed in this pull request: https://github.com/hrbrmstr/taucharts/pull/67 :)
Is it possible to add vertical lines to a graph? like
geom_vline
inggplot2
Right now I have this graph:
I would like to add two vertical lines:
Is that possible?
Thanks!