-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathui.R
87 lines (85 loc) · 2.19 KB
/
ui.R
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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
ui <- page_sidebar(
# include SCSS file
tags$head(
tags$style(sass(sass_file("www/style.scss")))
),
# Title ----
title = "European Sales Dashboard",
# Theme ----
theme = bs_theme(bootswatch = "shiny"),
# Sidebar / input controls ----
sidebar = sidebar(
title = "Input Controls",
pickerInput(
"category", "Product Category",
choices = c("All", unique(sales_data$Category)),
selected = "All",
options = pickerOptions(
actionsBox = TRUE,
liveSearch = TRUE)
),
pickerInput(
"region", "Region",
choices = c("All", unique(sales_data$Region)),
selected = "All",
options = pickerOptions(
actionsBox = TRUE,
liveSearch = TRUE)
),
pickerInput(
"year", "Year",
choices = c("All", unique(sales_data$Year)),
selected = "All",
options = pickerOptions(
actionsBox = TRUE,
liveSearch = TRUE)
),
pickerInput(
"country", "Country",
choices = c("All", unique(sales_data$Country)),
selected = "All",
options = pickerOptions(
actionsBox = TRUE,
liveSearch = TRUE)
)
),
# Value boxes ----
layout_columns(
fill = FALSE,
value_box(
title = "SALES",
value = textOutput("total_sales"),
showcase = bsicons::bs_icon("currency-dollar")),
value_box(
title = "PROFIT",
value = textOutput("total_profit"),
showcase = bsicons::bs_icon("currency-dollar")),
value_box(
title = "# OF CUSTOMERS",
value = textOutput("total_customers"),
showcase = bsicons::bs_icon("people-fill"))
),
# Main section ----
layout_columns(
# Monthly Sales plot ----
card(
full_screen = TRUE,
card_header("Monthly Sales Trend"),
echarts4rOutput("monthly_sales"),
),
# Product Sales plot ----
card(
full_screen = TRUE,
card_header("Sales Breakdown by Product"),
echarts4rOutput("product_sales"),
)
),
# Heat-map
card(
full_screen = TRUE,
card_header("The Number of Orders by Months and Years"),
echarts4rOutput("heat_map")
),
# Disconnect message on disconnection on App ----
disconnectMessage()
)