-
Notifications
You must be signed in to change notification settings - Fork 18
/
ui.R
52 lines (40 loc) · 1.83 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
# This code is the STATIC UI only - uploads the
# skeleton of the web page.
require(shiny);
# options(error = recover);
source("shiny_extend_g3.R")
static_links=list(`Github for g3plot`="https://github.com/404",
`Shiny`="http://shiny.rstudio.org",
`D3`="http://d3js.org",
`Google Groups`="http://groups.google.com/group/shiny-discuss")
# depends means the server restarts if one of these files is touched and
# the browser is refreshed. In Theory - but sometimes it seems like it's not working.
lapply(Sys.glob(c("*.R","*.js","js/*.js")),
shiny:::dependsOnFile)
# Define UI for dataset viewer application
shinyUI(pageWithSidebar(
# Application title
headerPanel(tags$a(href="https://github.com/404","G3plot=D3(Shiny(data())"),windowTitle="G3plot for Shiny and D3"),
sidebarPanel(
tags$p("This page is mainly to discover why g3plot is bad by applying it to data samples."),
h3("Data Selection"),
tags$p("some runs have a plot function. Others need your help"),
uiOutput("dataSetControls"),
Reduce(tagAppendChild,Map(
function(...)tags$li(tags$a(...,target="_blank"),tabindex="-1"),
names(static_links),href=static_links),
tags$ul(class="nav nav-list",role="menu",`aria-labelledby`="dropdownMenu", tags$li(class="nav-header","Documentation and opinions")))
),
# Show a summary of the dataset and an HTML table with the requested
# number of observations
mainPanel(
includeHTML("g3widget.html"),
hashProxy("hash"),
tabsetPanel(id="tabSelected",
tabPanel("G3Plot", uiOutput("g3input"), svgOutput("g3plotMultiPlexNav"), svgOutput("g3plotMultiPlex")),
tabPanel("Help", uiOutput("help")),
tabPanel("Base Plot", plotOutput("basePlot")),
tabPanel("Table", tableOutput("shinyTable"))
)
)
))