Description Usage Arguments Examples
Add a single item to a timeline
1 |
id |
Timeline id or a |
data |
A named list containing the item data to add. |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | timevis() %>%
addItem(list(start = Sys.Date(), content = "Today"))
if (interactive()) {
library(shiny)
shinyApp(
ui = fluidPage(
timevisOutput("timeline"),
actionButton("btn", "Add item today")
),
server = function(input, output) {
output$timeline <- renderTimevis(
timevis()
)
observeEvent(input$btn, {
addItem("timeline", list(start = Sys.Date(), content = "Today"))
})
}
)
}
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.