-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathui.R
72 lines (40 loc) · 1.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
library(datasets)
# Use a fluid Bootstrap layout
fluidPage(theme="d3style.css",
# Give the page a title
titlePanel("Testing D3 v1"),
sliderInput(inputId = "slider", label = "Select a number:", min = 0.01, max = 3, value = 0.3, step = 0.01),
textOutput(outputId = "result"),
# Generate a row with a sidebar
sidebarLayout(
# Define the sidebar with one input
sidebarPanel(
selectInput("region", "Region:",
choices=colnames(WorldPhones)),
hr(),
helpText("Source data"),
textInput("caption", "Caption:", "Data Summary"),
textInput("TEXT1", "tEXT:", "Data Summary"),
actionButton("goButton", "Go"),
),
# main panel where we will show the d3 plot
mainPanel(
# it will load the d3.js of version 5 in html from cdn
tags$head(tags$script(src="https://d3js.org/d3.v5.min.js")),
tags$head(tags$script(src="https://d3js.org/d3-scale-chromatic.v1.min.js")),
# this is the script where we create our d3 chart, which resides in www folder
tags$script(src="testd3js.js"),
# place for d3 chart
plotOutput("D3Plot"),
# Text part shown based on shiny control side panel
#h3(textOutput("TEXT1", container="click on the circle to lock output text to foo value")),
div("Some Examples - ", class="someClass"),
div("Some Other examples - ", class="otherClass"),
h3(textOutput("caption", container = span)),
h3(textOutput("TEXT1", container = span))
#div("Somee text", class="someClass",
# tags$input(type="submit", value="Dismiss")
#)
)
)
)