Skip to content

Instantly share code, notes, and snippets.

@ramnathv
Last active December 31, 2015 18:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ramnathv/8026211 to your computer and use it in GitHub Desktop.
Save ramnathv/8026211 to your computer and use it in GitHub Desktop.
Example 7: Rickshaw
library(rCharts)
usp = reshape2::melt(USPersonalExpenditure)
# get the decades into a date Rickshaw likes
usp$Var2 <- as.numeric(as.POSIXct(paste0(usp$Var2, "-01-01")))
p4 <- Rickshaw$new()
p4$layer(value ~ Var2, group = "Var1", data = usp, type = "area", width = 560)
# add a helpful slider this easily; other features TRUE as a default
p4$set(slider = TRUE)
p4
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment