Description Usage Arguments Value Examples
Create a Vertical HTML Timeline from a Data Frame
1 2 3 4 5 6 7 8 9 10 11 | create_tml(
df,
smr,
dsc,
smr_col = "white",
smr_bgcol = "#002240",
dsc_col = "#1D1D1D",
dsc_bgcol = "#FFFFFF",
dsc_size = "14px",
open = FALSE
)
|
df |
a data frame containing the necessary information. |
smr |
the column name that will be used as the summary component. |
dsc |
the column name that will be used as the description component. |
smr_col |
text color for the summary component. Defaults to 'white'. |
smr_bgcol |
background-color for the summary component. Defaults to "#002240". |
dsc_col |
text color for the description component. Defaults to "#1D1D1D". |
dsc_bgcol |
background-color for the description component. Defaults to "#FFFFFF". |
dsc_size |
font size of the description component. Defaults to "14px". |
open |
logical, whether to open by default the summary components. Default to FALSE |
A Vertical HTML Time Line Widget
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 | if(interactive()) {
df <- data.frame(
date_release = c("May 31, 2005",
"July 14, 2008",
"July 16, 2012 "),
description = c("Batman Begins",
"The Dark Knight",
"The Dark Knight Rises")
)
ui <- fluidPage(
br(),
h1("Batman Trigoly Timeline", style = "text-align:center"),
br(),
create_tml(df,
"date_release",
"description"),
)
server <- function(input, output) {}
shinyApp(ui = ui, server = server)
}
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.