setCurrentTime {linevis} | R Documentation |
Adjust the time of the current time bar
Description
Adjust the time of the current time bar
Usage
setCurrentTime(id, time)
Arguments
id |
graph2d id or a |
time |
The new date/time |
Value
None, side-effect is Javascript call
Examples
## Not run:
linevis() %>%
setCurrentTime(Sys.Date())
## End(Not run)
if (interactive()) {
library(shiny)
shinyApp(
ui = fluidPage(
linevisOutput("graph2d"),
actionButton("btn", "Set current time to beginning of today")
),
server = function(input, output) {
output$graph2d <- renderLinevis(
linevis()
)
observeEvent(input$btn, {
setCurrentTime("graph2d", Sys.Date())
})
}
)
}
[Package linevis version 1.0.0 Index]