forked from wanqiangdehuoguo/shinyVenn
-
Notifications
You must be signed in to change notification settings - Fork 0
/
ui.R
311 lines (281 loc) · 27.7 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
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
shinyUI(
navbarPage(
title = "Venn",
windowTitle = "make venn diagram in R with shiny",
tabPanel(
"venn diagram",
tags$style("#color1cus {width:100%}
#color2cus {width:100%}
#color3cus {width:100%}
#color4cus {width:100%}
#color5cus {width:100%}
#color6cus {width:100%}
#color7cus {width:100%}"),
sidebarPanel(width = 3,
checkboxInput("data1", HTML("<font color='red'>Data1</font>"), FALSE),
conditionalPanel(condition="input.data1",
radioButtons("seluploaddata1", NULL, c("Disable data input" = "1", "Upload input data" = "2","Paste input data" = "3"), "1"),
conditionalPanel(condition="input.seluploaddata1 == '2'",
fileInput("uploaddata1",
h5("Upload data1:",
bsButton("bsb01", label="", icon=icon("question"), style="info", size="small")
), multiple = FALSE),
bsPopover("bsb01", '点击 "Browse" 上传数据(数据格式为一列,且每一行为一个元素)', trigger = "focus"),
textInput("Data1name",h5("Data label:",
bsButton("bsb02", label="", icon=icon("question"), style="info", size="small")
),value = "A"),
bsPopover("bsb02", '数据名称', trigger = "focus"),
h5("Data color:",
bsButton("bsb03", label="", icon=icon("question"), style="info", size="small")
),
bsPopover("bsb03", '确定绘制图片时这组数据的颜色', trigger = "focus"),
fluidRow(column(12,jscolorInput("color1cus", label = NULL, value = "#FF0000")))
),
conditionalPanel(condition="input.seluploaddata1 == '3'",
textAreaInput("pastedata1",h5("Paste data1:",
bsButton("bsb04", label="", icon=icon("question"), style="info", size="small")
), width="100%", resize="vertical", height="200px",placeholder = "One item in one row"),
bsPopover("bsb04", '将你的数据粘贴到文本框内(数据格式为一列,且每一行为一个元素)', trigger = "focus"),
textInput("Data1name",h5("Data label:",
bsButton("bsb05", label="", icon=icon("question"), style="info", size="small")
),value = "A"),
bsPopover("bsb05", '数据名称', trigger = "focus"),
h5("Data color:",
bsButton("bsb06", label="", icon=icon("question"), style="info", size="small")
),
bsPopover("bsb06", '确定绘制图片时这组数据的颜色', trigger = "focus"),
fluidRow(column(12, jscolorInput("color1cus", label = NULL, value = "#FF0000")))
)
),
checkboxInput("data2", HTML("<font color='red'>Data2</font>"), FALSE),
conditionalPanel(condition="input.data2",
radioButtons("seluploaddata2", NULL, c("Disable data input" = "1", "Upload input data" = "2","Paste input data" = "3"), "1"),
conditionalPanel(condition="input.seluploaddata2 == '2'",
fileInput("uploaddata2",h5("Upload data2:",
bsButton("bsb07", label="", icon=icon("question"), style="info", size="small")
),multiple = FALSE),
bsPopover("bsb07", '点击 "Browse" 上传数据(数据格式为一列,且每一行为一个元素)', trigger = "focus"),
textInput("Data2name",h5("Data label:",
bsButton("bsb08", label="", icon=icon("question"), style="info", size="small")
),value = "B"),
bsPopover("bsb08", '数据名称', trigger = "focus"),
h5("Data color:",
bsButton("bsb09", label="", icon=icon("question"), style="info", size="small")
),
bsPopover("bsb09", '确定绘制图片时这组数据的颜色', trigger = "focus"),
fluidRow(column(12, jscolorInput("color2cus", label = NULL, value = "#FFFF00")))
),
conditionalPanel(condition="input.seluploaddata2 == '3'",
textAreaInput("pastedata2",h5("Paste data2:",
bsButton("bsb10", label="", icon=icon("question"), style="info", size="small")
), width="100%", resize="vertical", height="200px",placeholder = "One item in one row"),
bsPopover("bsb10", '将你的数据粘贴到文本框内(数据格式为一列,且每一行为一个元素)', trigger = "focus"),
textInput("Data2name",h5("Data label:",
bsButton("bsb11", label="", icon=icon("question"), style="info", size="small")
),value = "B"),
bsPopover("bsb11", '数据名称', trigger = "focus"),
h5("Data color:",
bsButton("bsb012", label="", icon=icon("question"), style="info", size="small")
),
bsPopover("bsb12", '确定绘制图片时这组数据的颜色', trigger = "focus"),
fluidRow(column(12, jscolorInput("color2cus", label = NULL, value = "#FFFF00")))
)
),
checkboxInput("data3", HTML("<font color='red'>Data3</font>"), FALSE),
conditionalPanel(condition="input.data3",
radioButtons("seluploaddata3", NULL, c("Disable data input" = "1", "Upload input data" = "2","Paste input data" = "3"), "1"),
conditionalPanel(condition="input.seluploaddata3 == '2'",
fileInput("uploaddata3",h5("Upload data3:",
bsButton("bsb13", label="", icon=icon("question"), style="info", size="small")
), multiple = FALSE),
bsPopover("bsb13", '点击 "Browse" 上传数据(数据格式为一列,且每一行为一个元素)', trigger = "focus"),
textInput("Data3name",h5("Data label:",
bsButton("bsb14", label="", icon=icon("question"), style="info", size="small")
),value = "C"),
bsPopover("bsb14", '数据名称', trigger = "focus"),
h5("Data color:",
bsButton("bsb15", label="", icon=icon("question"), style="info", size="small")
),
bsPopover("bsb15", '确定绘制图片时这组数据的颜色', trigger = "focus"),
fluidRow(column(12, jscolorInput("color3cus", label = NULL, value = "#2F27EE")))
),
conditionalPanel(condition="input.seluploaddata3 == '3'",
textAreaInput("pastedata3",h5("Paste data3:",
bsButton("bsb16", label="", icon=icon("question"), style="info", size="small")
), width="100%", resize="vertical", height="200px",placeholder = "One item in one row"),
bsPopover("bsb16", '将你的数据粘贴到文本框内(数据格式为一列,且每一行为一个元素)', trigger = "focus"),
textInput("Data3name",h5("Data label:",
bsButton("bsb17", label="", icon=icon("question"), style="info", size="small")
),value = "C"),
bsPopover("bsb17", '数据名称', trigger = "focus"),
h5("Data color:",
bsButton("bsb018", label="", icon=icon("question"), style="info", size="small")
),
bsPopover("bsb18", '确定绘制图片时这组数据的颜色', trigger = "focus"),
fluidRow(column(12, jscolorInput("color3cus", label = NULL, value = "#2F27EE")))
)
),
checkboxInput("data4", HTML("<font color='red'>Data4</font>"), FALSE),
conditionalPanel(condition="input.data4",
radioButtons("seluploaddata4", NULL, c("Disable data input" = "1", "Upload input data" = "2","Paste input data" = "3"), "1"),
conditionalPanel(condition="input.seluploaddata4 == '2'",
fileInput("uploaddata4",h5("Upload data4:",
bsButton("bsb19", label="", icon=icon("question"), style="info", size="small")
), multiple = FALSE),
bsPopover("bsb19", '点击 "Browse" 上传数据(数据格式为一列,且每一行为一个元素)', trigger = "focus"),
textInput("Data4name",h5("Data label:",
bsButton("bsb20", label="", icon=icon("question"), style="info", size="small")
),value = "D"),
bsPopover("bsb20", '数据名称', trigger = "focus"),
h5("Data color:",
bsButton("bsb21", label="", icon=icon("question"), style="info", size="small")
),
bsPopover("bsb21", '确定绘制图片时这组数据的颜色', trigger = "focus"),
fluidRow(column(12, jscolorInput("color4cus", label = NULL, value = "#00EE02")))
),
conditionalPanel(condition="input.seluploaddata4 == '3'",
textAreaInput("pastedata4",h5("Paste data4:",
bsButton("bsb22", label="", icon=icon("question"), style="info", size="small")
),width="100%", resize="vertical", height="200px",placeholder = "One item in one row"),
bsPopover("bsb22", '将你的数据粘贴到文本框内(数据格式为一列,且每一行为一个元素)', trigger = "focus"),
textInput("Data4name",h5("Data label:",
bsButton("bsb23", label="", icon=icon("question"), style="info", size="small")
),value = "D"),
bsPopover("bsb23", '数据名称', trigger = "focus"),
h5("Data color:",
bsButton("bsb024", label="", icon=icon("question"), style="info", size="small")
),
bsPopover("bsb24", '确定绘制图片时这组数据的颜色', trigger = "focus"),
fluidRow(column(12, jscolorInput("color4cus", label = NULL, value = "#00EE02")))
)
),
checkboxInput("data5", HTML("<font color='red'>Data5</font>"), FALSE),
conditionalPanel(condition="input.data5",
radioButtons("seluploaddata5", NULL, c("Disable data input" = "1", "Upload input data" = "2","Paste input data" = "3"), "1"),
conditionalPanel(condition="input.seluploaddata5 == '2'",
fileInput("uploaddata5",h5("Upload data5:",
bsButton("bsb25", label="", icon=icon("question"), style="info", size="small")
), multiple = FALSE),
bsPopover("bsb25", '点击 "Browse" 上传数据(数据格式为一列,且每一行为一个元素))', trigger = "focus"),
textInput("Data5name",h5("Data label:",
bsButton("bsb26", label="", icon=icon("question"), style="info", size="small")
),value = "E"),
bsPopover("bsb26", '数据名称', trigger = "focus"),
h5("Data color:",
bsButton("bsb27", label="", icon=icon("question"), style="info", size="small")
),
bsPopover("bsb27", '确定绘制图片时这组数据的颜色', trigger = "focus"),
fluidRow(column(12, jscolorInput("color5cus", label = NULL, value = "#CCDDEE")))
),
conditionalPanel(condition="input.seluploaddata5 == '3'",
textAreaInput("pastedata5",h5("Paste data5:",
bsButton("bsb28", label="", icon=icon("question"), style="info", size="small")
), width="100%", resize="vertical", height="200px",placeholder = "One item in one row"),
bsPopover("bsb28", '将你的数据粘贴到文本框内(数据格式为一列,且每一行为一个元素)', trigger = "focus"),
textInput("Data5name",h5("Data label:",
bsButton("bsb29", label="", icon=icon("question"), style="info", size="small")
),value = "E"),
bsPopover("bsb29", '数据名称', trigger = "focus"),
h5("Data color:",
bsButton("bsb030", label="", icon=icon("question"), style="info", size="small")
),
bsPopover("bsb30", '确定绘制图片时这组数据的颜色', trigger = "focus"),
fluidRow(column(12, jscolorInput("color5cus", label = NULL, value = "#CCDDEE")))
)
),
checkboxInput("data6", HTML("<font color='red'>Data6</font>"), FALSE),
conditionalPanel(condition="input.data6",
radioButtons("seluploaddata6", NULL, c("Disable data input" = "1", "Upload input data" = "2","Paste input data" = "3"), "1"),
conditionalPanel(condition="input.seluploaddata6 == '2'",
fileInput("uploaddata6",h5("Upload data6:",
bsButton("bsb31", label="", icon=icon("question"), style="info", size="small")
), multiple = FALSE),
bsPopover("bsb31", '点击 "Browse" 上传数据(数据格式为一列,且每一行为一个元素)', trigger = "focus"),
textInput("Data6name",h5("Data label:",
bsButton("bsb32", label="", icon=icon("question"), style="info", size="small")
),value = "F"),
bsPopover("bsb32", '数据名称', trigger = "focus"),
h5("Data color:",
bsButton("bsb33", label="", icon=icon("question"), style="info", size="small")
),
bsPopover("bsb33", '确定绘制图片时这组数据的颜色', trigger = "focus"),
fluidRow(column(12, jscolorInput("color6cus", label = NULL, value = "#FF8623")))
),
conditionalPanel(condition="input.seluploaddata6 == '3'",
textAreaInput("pastedata6",h5("Paste data6:",
bsButton("bsb34", label="", icon=icon("question"), style="info", size="small")
), width="100%", resize="vertical", height="200px",placeholder = "One item in one row"),
bsPopover("bsb34", '将你的数据粘贴到文本框内(数据格式为一列,且每一行为一个元素)', trigger = "focus"),
textInput("Data6name",h5("Data label:",
bsButton("bsb35", label="", icon=icon("question"), style="info", size="small")
),value = "F"),
bsPopover("bsb35", '数据名称', trigger = "focus"),
h5("Data color:",
bsButton("bsb036", label="", icon=icon("question"), style="info", size="small")
),
bsPopover("bsb36", '确定绘制图片时这组数据的颜色', trigger = "focus"),
fluidRow(column(12, jscolorInput("color6cus", label = NULL, value = "#FF8623")))
)
),
checkboxInput("data7", HTML("<font color='red'>Data7</font>"), FALSE),
conditionalPanel(condition="input.data7",
radioButtons("seluploaddata7", NULL, c("Disable data input" = "1", "Upload input data" = "2","Paste input data" = "3"), "1"),
conditionalPanel(condition="input.seluploaddata7 == '2'",
fileInput("uploaddata7",h5("Upload data7:",
bsButton("bsb37", label="", icon=icon("question"), style="info", size="small")
), multiple = FALSE),
bsPopover("bsb37", '点击 "Browse" 上传数据(数据格式为一列,且每一行为一个元素)', trigger = "focus"),
textInput("Data7name",h5("Data label:",
bsButton("bsb38", label="", icon=icon("question"), style="info", size="small")
),value = "G"),
bsPopover("bsb38", '数据名称', trigger = "focus"),
h5("Data color:",
bsButton("bsb39", label="", icon=icon("question"), style="info", size="small")
),
bsPopover("bsb39", '确定绘制图片时这组数据的颜色', trigger = "focus"),
fluidRow(column(12, jscolorInput("color7cus", label = NULL, value = "#CC1344")))
),
conditionalPanel(condition="input.seluploaddata7 == '3'",
textAreaInput("pastedata7",h5("Paste data7:",
bsButton("bsb40", label="", icon=icon("question"), style="info", size="small")
), width="100%", resize="vertical", height="200px",placeholder = "One item in one row"),
bsPopover("bsb40", '将你的数据粘贴到文本框内(数据格式为一列,且每一行为一个元素)', trigger = "focus"),
textInput("Data7name",h5("Data label:",
bsButton("bsb41", label="", icon=icon("question"), style="info", size="small")
),value = "G"),
bsPopover("bsb41", '数据名称', trigger = "focus"),
h5("Data color:",
bsButton("bsb42", label="", icon=icon("question"), style="info", size="small")
),
bsPopover("bsb42", '确定绘制图片时这组数据的颜色', trigger = "focus"),
fluidRow(column(12, jscolorInput("color7cus", label = NULL, value = "#CC1344")))
)
),
actionButton("submit1", strong("Submit"),class = "btn-primary"),
br(),
h4("Plot options"),
checkboxInput("vennSize", "Adjust plot size", FALSE),
conditionalPanel(
condition = "input.vennSize",
numericInput("vennHeight", "Plot height:", value = 550),
numericInput("vennWidth", "Plot width:", value = 750)),
sliderInput("textsize", h5("Set label font size",
bsButton("bsb43", label="", icon=icon("question"), style="info", size="small")
), min=0.5, max=5, value=0.8, step=0.1),
bsPopover("bsb43", "设置标签字体的大小", trigger = "focus"),
sliderInput("labelsize", h5("Set intersection label font size",
bsButton("bsb44", label="", icon=icon("question"), style="info", size="small")
), min=0.5, max=5, value=0.8, step=0.1),
bsPopover("bsb44", "设置交集字体的大小", trigger = "focus")
),
mainPanel(
downloadButton("downloadvenn.pdf", "Download pdf-file"),
downloadButton("downloadvenn.svg", "Download svg-file"),
downloadButton("downloadvenn.csv", "Download csv-file"),
plotOutput("venn", height = '100%', width = '100%')),
textOutput("text")
),
tabPanel("Help",includeHTML("Help.html")),
tabPanel("About",includeMarkdown("About.md"))
)
)