-
Notifications
You must be signed in to change notification settings - Fork 0
/
ui.R
84 lines (52 loc) · 2.5 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
# R_Shiny
library(shiny)
# Define UI for miles per gallon application
shinyUI(pageWithSidebar(
# Application title
headerPanel("Shiny Plots"),
# Sidebar with controls to select the variable to plot against mpg
# and to specify whether outliers should be included
sidebarPanel(
selectInput("plotType", "Plot Type", c(Scatter = "scatter", Histogram = "hist") ),
fileInput("userData", "Choose File:", multiple = FALSE, accept = ".csv"),
selectInput("FilterColumn", "Filter By Column name", choices = NULL),
textInput("FilterValue", "Filter Value:", value=""),
radioButtons("FilterValueType", "Data type for Filter Value:",
c("Numeric" = "Numeric",
"String" = "String"), selected = "Numeric"),
sliderInput("PlotWidth", "Plot Width: ", min = 500, max=1200, value = 600 ),
sliderInput("PlotHeight", "Plot Height: ", min = 500, max=1200, value = 600 ) ,
sliderInput("text_size", "Text Size:",min = 10, max = 20, value = 15),
conditionalPanel(
condition = "input.plotType == 'scatter'",
selectInput("dataCol_x", "X-axis:", choices = NULL),
radioButtons("xtype", "Data type for x-axis:",
c("Numeric" = "Numeric",
"Category" = "Category"), selected = "Category"),
selectInput("dataCol_y", "y-axis:", choices = NULL),
radioButtons("ytype", "Data type for y-axis:",
c("Numeric" = "Numeric",
"Category" = "Category"), selected = "Numeric"),
selectInput("ColorBy", "Color By:", choices = NULL),
selectInput("ShapeBy", "Shape By:", choices= NULL),
textInput("FacetBy", "Facet By:", value = "") ),
conditionalPanel(
condition = "input.plotType == 'hist'",
selectInput("hist_Col", "hist-axis:", choices = NULL),
sliderInput("breaknumber", "Break Number:",min = 1, max = 20, value = 15) )
),
# Show the caption and plot of the requested variable against mpg
mainPanel(
# h3(textOutput("caption")),
#
# plotOutput("mpgPlot"),
#
# tableOutput("mydata")
downloadButton('pngobj', 'Download Plot'),
uiOutput("tb")
# tabPanel("Plot", fluidRow(plotOutput("mpgPlot", width = input$PlotWidth, height = input$PlotHeight),
#
# tableOutput("mydata"),
# textOutput("caption") )
)
))