1. #2013-07-12 Need dev version of rCharts
  2. require(devtools)
  3. install_github('rCharts', 'ramnathv', ref = "dev")
  4. require(rCharts)
  5. data( economics, package = "ggplot2" )
  6. economics$date = format(economics$date, "%Y-%m-%d")
  7. d1 <- dPlot(
  8. x = "date",
  9. y = "uempmed",
  10. data = economics,
  11. type = "line",
  12. height = 400,
  13. width = 700,
  14. bounds = list(x=50,y=20,width=650,height=300)
  15. )
  16. d1$xAxis(
  17. type = "addTimeAxis",
  18. inputFormat = "%Y-%m-%d",
  19. outputFormat = "%b %Y"
  20. )
  21. d1