0%10%20%30%40%50%60%70%80%90%100%UnitSalesJan-11Jan-12Feb-11Feb-12Mar-11Mar-12Apr-11Apr-12May-11May-12Jun-11Jun-12Jul-11Jul-12Aug-11Aug-12Sep-11Sep-12Oct-11Oct-12Nov-11Nov-12Dec-11Dec-12MonthSupermarketsHypermarkets

  1. ### example 36 Vertical 100% Stacked Area
  2. d1 <- dPlot(
  3. x = "UnitSales",
  4. y = "Month",
  5. groups = "Channel",
  6. data = subset(data, Owner %in% c("Aperture","Black Mesa")),
  7. type = "area",
  8. bounds = list(x=80,y=30,height=480,width=330),
  9. height = 400,
  10. width = 590
  11. )
  12. d1$xAxis(type = "addPctAxis")
  13. d1$yAxis(type = "addCategoryAxis", grouporderRule = "Date")
  14. d1$legend(
  15. x = 60,
  16. y = 10,
  17. width = 500,
  18. height = 20,
  19. horizontalAlign = "right"
  20. )
  21. d1