Advertisement
Guest User

Untitled

a guest
Feb 21st, 2019
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.87 KB | None | 0 0
  1. data <- data.frame(
  2. id = 1:4,
  3. content = c("Item one", "Item two",
  4. "Ranged item", "Item four"),
  5. start = c("2016-01-10", "2016-01-11",
  6. "2016-01-20", "2016-02-14 15:00:00"),
  7. end = c(NA, NA, "2016-02-04", NA),
  8. editable = TRUE
  9. )
  10. timevis(data)
  11.  
  12. library(shiny)
  13. library(timevis)
  14.  
  15. data <- data.frame(
  16. id = 1:4,
  17. content = c("Item one", "Item two",
  18. "Ranged item", "Item four"),
  19. start = c("2016-01-10", "2016-01-11",
  20. "2016-01-20", "2016-02-14 15:00:00"),
  21. end = c(NA, NA, "2016-02-04", NA),
  22. editable = TRUE
  23. )
  24.  
  25. ui <- fluidPage(
  26. tags$head(
  27. tags$style(HTML("
  28. .vis-item .vis-item-overflow { overflow: visible; }
  29. "))
  30. ),
  31. timevisOutput('timeline')
  32. )
  33.  
  34. server <- function(input, output, session) {
  35. output$timeline <- renderTimevis( timevis(data) )
  36. }
  37.  
  38. shinyApp(ui, server)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement