-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathui.R
89 lines (82 loc) · 3.15 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
88
89
library(shiny)
library(shinydashboard)
library(datasets)
library(data.table)
library(dplyr)
library(ggplot2)
library(plotrix)
library(gridExtra)
library(rpivotTable)
#Used shinyUI dashboard to create rich interactive dashboard component.
shinyUI(dashboardPage(
title = "Product Sales Analysis",
skin = "red",
dashboardHeader(title = "Sales Analysis "
),
dashboardSidebar(
sidebarMenu(
menuItem("Dashboard", tabName = "dashboard", icon = icon("dashboard")),
menuSubItem("Sales", tabName = "sales", icon = icon("bar-chart")),
menuSubItem("Category-wise Performance", tabName = "prodlineperf", icon = icon("bolt"))
)
),
dashboardBody(
headerPanel("",
tags$head(
tags$img(src="ttu1.png", style="width:100%")
)
),
tabItems(
tabItem(tabName = "dashboard",
fluidRow(
column(width = 10,
valueBoxOutput("countries"),
valueBoxOutput("products")
)
),
fluidRow(
box(title = "Country-wise Revenue", solidHeader = T,
status = "success", plotOutput("piechart", hover = hoverOpts(id ="plot_hover", delay = 0)),
uiOutput("dynamic")),
box(title = "Sales Revenue Data", status = "warning", solidHeader = T,
background = "teal",
DT::dataTableOutput("country_rev")
)
)
),
tabItem(tabName = "sales",
fluidRow(
column(12,
tabBox(width = 12,
tabPanel(title = "Retailer-wise Revenue", solidHeader = T,
background = "aqua",
status = "primary",
tags$head(tags$style( type = 'text/css', '#rpivotRetRev{ overflow-x: scroll; }')),
rpivotTableOutput("rpivotRetRev")
),
tabPanel(title = "Order Method Type", status = "warning", solidHeader = T,
background = "teal",
tags$head(tags$style( type = 'text/css', '#rpivotOrderMethType{ overflow-x: scroll; }')),
rpivotTableOutput("rpivotOrderMethType")
)
)
)
)
),
tabItem(tabName = "prodlineperf",
fluidRow(
column(12,
tabBox(width = 12,
tabPanel(title = "Category-wise Performance", solidHeader = T,
background = "aqua",
status = "primary",
tags$head(tags$style( type = 'text/css', '#rpivotProdPerf{ overflow-x: scroll; }')),
rpivotTableOutput("rpivotProdPerf")
)
)
)
)
)
)
)
))