From 9325f7cc045cbab705312ba2d6281e04303a2385 Mon Sep 17 00:00:00 2001 From: Midoux Cedric Date: Wed, 28 Nov 2018 15:07:10 +0100 Subject: [PATCH] plot size button --- server.R | 50 ++++++++++++++++++++++++++++++++++++++++++++++++-- ui.R | 7 ++++++- 2 files changed, 54 insertions(+), 3 deletions(-) diff --git a/server.R b/server.R index 553404c..c3c9072 100644 --- a/server.R +++ b/server.R @@ -156,8 +156,54 @@ shinyServer validate(need(data16S(), "")) tags$div( style = "text-align:center", - title = "Download as RData", - downloadButton("downloadData", "Download", style = "color: black; background-color: gray90") + title = "Download file as RData", + downloadButton("downloadData", "Download RData file", style = "color: black; background-color: gray90") + ) + }) + + observeEvent(input$plotSize, { + showModal( + modalDialog( + title = "Setting plot size", + numericInput( + "plotWidth", + label = "Plot width : ", + value = 6, + min = 1, + max = 50 + ), + numericInput( + "plotHeight", + label = "Plot height : ", + value = 6, + min = 1, + max = 50 + ), + radioButtons( + "plotUnits", + label = "Units : ", + choices = list("in", "cm", "mm"), + selected = "cm", + inline = TRUE + ), + numericInput( + "plotDPI", + label = "Plot resolution : ", + value = 300, + min = 70, + max = 500, + step = 10 + ), + selectInput( + "plotDevice", + label = "Plot device : ", + choices = list("eps", "ps", "tex", "pdf", "jpeg", "tiff", "png", "bmp", "svg"), + selected = "pdf" + ), + size = "s", + easyClose = TRUE, + footer = NULL + ) ) }) diff --git a/ui.R b/ui.R index 94de056..ad6ce4f 100644 --- a/ui.R +++ b/ui.R @@ -76,7 +76,12 @@ shinyUI(dashboardPage( # placeholder = "data.fasta" # ) # ), - uiOutput("downloadUI") + hr(), + uiOutput("downloadUI"), + tags$div( + align = "center", + actionButton("plotSize", label = "Plot size") + ) ), dashboardBody( tabsetPanel( -- GitLab