-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathapp.R
More file actions
32 lines (28 loc) · 662 Bytes
/
app.R
File metadata and controls
32 lines (28 loc) · 662 Bytes
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
library(shiny)
library(nivor)
ui <- fluidPage(
titlePanel("Calendar Example"),
calendarOutput("calender")
)
server <- function(input, output, session) {
output$calender <- renderCalendar({
df <- data.frame(
day = seq.Date(
from = as.Date("2020-04-01"),
length.out = 600,
by = "days"
),
value = round(runif(600) * 1000, 0)
)
n_calendar(
data = df,
emptyColor = "#eeeeee",
colors = c("#d6e685", "#8cc665", "#44a340", "#1e6823"),
yearSpacing = 40,
monthBorderColor = "#ffffff",
dayBorderWidth = 2,
dayBorderColor = "#ffffff"
)
})
}
shinyApp(ui, server)