Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cocoVisR
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
2
Issues
2
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Stephanie Wegscheidl
cocoVisR
Commits
0145b675
Commit
0145b675
authored
Nov 30, 2018
by
Stephanie Wegscheidl
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
first trys for download
multiple still not working
parent
9d93cf1b
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
48 additions
and
10 deletions
+48
-10
dashboard/server.R
dashboard/server.R
+46
-9
dashboard/ui.R
dashboard/ui.R
+2
-1
dashboard/www/myreport.pdf
dashboard/www/myreport.pdf
+0
-0
No files found.
dashboard/server.R
View file @
0145b675
...
@@ -398,7 +398,7 @@ server <- function(input, output, session) {
...
@@ -398,7 +398,7 @@ server <- function(input, output, session) {
collapsible
=
TRUE
,
collapsible
=
TRUE
,
#add_tooltip(data_tooltip, "hover"),
#add_tooltip(data_tooltip, "hover"),
plotOutput
(
"line"
,
height
=
250
))
line_plot
<<-
plotOutput
(
"line"
,
height
=
250
))
})
})
#TODO: linechart View
#TODO: linechart View
...
@@ -420,7 +420,7 @@ server <- function(input, output, session) {
...
@@ -420,7 +420,7 @@ server <- function(input, output, session) {
solidHeader
=
TRUE
,
solidHeader
=
TRUE
,
collapsible
=
TRUE
,
collapsible
=
TRUE
,
plotOutput
(
"scat"
,
height
=
250
))
scat_plot
<<-
plotOutput
(
"scat"
,
height
=
250
))
})
})
#TODO: Scatterplot View
#TODO: Scatterplot View
...
@@ -442,7 +442,7 @@ server <- function(input, output, session) {
...
@@ -442,7 +442,7 @@ server <- function(input, output, session) {
solidHeader
=
TRUE
,
solidHeader
=
TRUE
,
collapsible
=
TRUE
,
collapsible
=
TRUE
,
plotOutput
(
"box"
,
height
=
250
))
box_plot
<<-
plotOutput
(
"box"
,
height
=
250
))
})
})
#TODO: Boxplot View
#TODO: Boxplot View
...
@@ -463,7 +463,7 @@ server <- function(input, output, session) {
...
@@ -463,7 +463,7 @@ server <- function(input, output, session) {
solidHeader
=
TRUE
,
solidHeader
=
TRUE
,
collapsible
=
TRUE
,
collapsible
=
TRUE
,
leafletOutput
(
"map"
,
height
=
250
))
map_plot
<<-
leafletOutput
(
"map"
,
height
=
250
))
})
})
# MAP VIEW
# MAP VIEW
...
@@ -512,15 +512,52 @@ server <- function(input, output, session) {
...
@@ -512,15 +512,52 @@ server <- function(input, output, session) {
}
}
#DownloadButton
#DownloadButton
plotinput
<-
function
()
{
#df<-data.frame(q=c(1,3,5,7,9),w=c(2,4,6,8,10),z=c(1,2,3,4,5))
list
(
p1
=
map_plot
,
p2
=
line_plot
,
p3
=
scat_plot
)
}
output
$
down.pdf
<-
downloadHandler
(
##FIRST TRY
# print("download wird aufgerufen"),
# filename = function() { paste('plot', '.png', sep='') },
# content = function() {
# ggsave(plot=map_plot, file=input$nut$datapath)
#}
#SECOND TRY
filename
=
function
(){
paste
(
"Graphs"
,
"pdf"
,
sep
=
"."
)},
content
=
function
(
file
)
{
cairo_pdf
(
file
=
file
,
width
=
12
,
height
=
8
)
#boxplot(data$V1, type="box", xlab=input$box_x)
map_plot
dev.off
()
})
##THIRD TRY
# observeEvent(input$down.pdf, {
#
# pdf("www/myreport.pdf")
# plotinput()
# dev.off()
# tags$iframe(style="height:600px; width:100%", src="myreport.pdf")
#
# })
#TODO: MAKE IT WORK!
#TODO: MAKE IT WORK!
observeEvent
(
input
$
screenshot
,{
#
observeEvent(input$screenshot,{
#if(input$check_line|input$check_time|input$check_map|input$check_hist)
#if(input$check_line|input$check_time|input$check_map|input$check_hist)
#disable("screenshot")
#disable("screenshot")
#webshot::install_phantomjs()
#webshot::install_phantomjs()
cdat
<<-
session
$
clientData
#
cdat <<- session$clientData
url
<-
paste0
(
cdat
$
url_hostname
,
":"
,
cdat
$
url_port
,
"/"
)
#
url <- paste0(cdat$url_hostname,":", cdat$url_port,"/")
print
(
url
)
#
print(url)
#URL <- "http://rstudio.github.io/leaflet/"
#URL <- "http://rstudio.github.io/leaflet/"
#appshot("cocoVisR/", file = "dashboard.png", port = getOption("shiny.port"), envvars = NULL)
#appshot("cocoVisR/", file = "dashboard.png", port = getOption("shiny.port"), envvars = NULL)
...
@@ -543,7 +580,7 @@ server <- function(input, output, session) {
...
@@ -543,7 +580,7 @@ server <- function(input, output, session) {
})
#
})
# url <- paste0(cdat$url_protocol,"//",cdat$url_hostname,":", cdat$url_port, cdat$url_pathname,cdat$url_search)
# url <- paste0(cdat$url_protocol,"//",cdat$url_hostname,":", cdat$url_port, cdat$url_pathname,cdat$url_search)
#output$downButton <- downloadHandler(
#output$downButton <- downloadHandler(
# filename="dashboard.png",
# filename="dashboard.png",
...
...
dashboard/ui.R
View file @
0145b675
...
@@ -134,8 +134,9 @@ ui <- dashboardPage(
...
@@ -134,8 +134,9 @@ ui <- dashboardPage(
uiOutput
(
"scat_box"
),
uiOutput
(
"scat_box"
),
uiOutput
(
"box_box"
),
uiOutput
(
"box_box"
),
uiOutput
(
"map_box"
),
uiOutput
(
"map_box"
),
uiOutput
(
"pdfview"
),
actionButton
(
"screenshot
"
,
"Download"
)))
downloadButton
(
"down.pdf
"
,
"Download"
)))
...
...
dashboard/www/myreport.pdf
0 → 100644
View file @
0145b675
File added
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment