1. #require(devtools)
  2. #install_github('rCharts', 'ramnathv')
  3. require(rCharts)
  4. #get data used by dimple for all of its examples as a first test
  5. data <- read.delim(
  6. "//pmsi-alignalytics.github.io/dimple/data/example_data.tsv"
  7. )
  8. ### eliminate . to avoid confusion in javascript
  9. colnames(data) <- gsub("[.]","",colnames(data))
  10. ### example 13 vertical marimekko
  11. d1 <- dPlot(
  12. UnitSales ~ Channel,
  13. groups = "Owner",
  14. data = data,
  15. type = "bar"
  16. )
  17. d1$xAxis(type = "addAxis", measure = "UnitSales", showPercent = TRUE)
  18. d1$yAxis(type = "addPctAxis")
  19. d1$legend(
  20. x = 200,
  21. y = 10,
  22. width = 400,
  23. height = 20,
  24. horizontalAlign = "right"
  25. )
  26. #test with storyboard
  27. d1$set(storyboard = "Date")
  28. d1