There appears to be an error when trying to use 'fill' when the x axis is of class 'Date' (but not otherwise).
library(ggvis)
library(ggplot2)
data <- data.frame("Date" = c(as.Date("2014-11-17"), as.Date("2014-11-17"), as.Date("2014-11-18")),
"Weekday" = c("Monday", "Monday", "Tuesday"),
"Hours" = c(5,3,8),
"Work" = c("Writing", "Reading", "Analysis"))
ggplot(data = data, aes(x = Date, y = Hours, fill = Work)) + geom_bar(stat = 'identity')
data %>%
ggvis(x = ~Weekday, y = ~Hours, fill = ~Work) %>%
layer_bars()
data %>%
ggvis(x = ~Date, y = ~Hours, fill = ~Work) %>%
layer_bars()
Not sure if this is an error or expected behaviour? My first ever question so my apologies if this is silly / poor etiquette / should have been in google groups - but I didn't find the answer anywhere else.
Hi there,
There appears to be an error when trying to use 'fill' when the x axis is of class 'Date' (but not otherwise).
Not sure if this is an error or expected behaviour? My first ever question so my apologies if this is silly / poor etiquette / should have been in google groups - but I didn't find the answer anywhere else.
P.S. You guys are awesome.