Skip to content
This repository has been archived by the owner. It is now read-only.

Commit

Permalink
Merge pull request #7 from HendrikSchultheis/loading
Browse files Browse the repository at this point in the history
Loading
  • Loading branch information
jenzopr authored Feb 5, 2018
2 parents d81617d + 053d090 commit 37b218f
Show file tree
Hide file tree
Showing 7 changed files with 12 additions and 10 deletions.
3 changes: 2 additions & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ Imports: shiny,
factoextra,
heatmaply,
shinyBS,
shinythemes
shinythemes,
shinycssloaders
RoxygenNote: 6.0.1
biocViews:
2 changes: 1 addition & 1 deletion R/featureSelector.R
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ featureSelectorUI <- function(id){
shiny::fluidRow(
shinydashboard::box(width = 12, collapsible = TRUE,
shiny::div(id = ns("guide_table"),
DT::dataTableOutput(ns("table")),
shinycssloaders::withSpinner(DT::dataTableOutput(ns("table"))),
shiny::br(),
shiny::uiOutput(ns("row_select"))
)
Expand Down
4 changes: 2 additions & 2 deletions R/geneView.R
Original file line number Diff line number Diff line change
Expand Up @@ -329,9 +329,9 @@ geneView <- function(input, output, session, data, metadata, level = NULL, plot.

output$geneView <- shiny::renderUI({
if(plot.method == "interactive"){
plotly::plotlyOutput(session$ns("interactive"))
shinycssloaders::withSpinner(plotly::plotlyOutput(session$ns("interactive")), proxy.height = "800px")
}else if (plot.method == "static"){
shiny::plotOutput(session$ns("static"))
shinycssloaders::withSpinner(shiny::plotOutput(session$ns("static")), proxy.height = "800px")
}
})

Expand Down
4 changes: 2 additions & 2 deletions R/global_cor_heatmap.R
Original file line number Diff line number Diff line change
Expand Up @@ -211,11 +211,11 @@ global_cor_heatmap <- function(input, output, session, data, types, plot.method
# load dynamic ui
if(plot.method == "static") {
output$cor_heatmap <- shiny::renderUI({
shiny::plotOutput(outputId = session$ns("static"))
shinycssloaders::withSpinner(shiny::plotOutput(outputId = session$ns("static")), proxy.height = "800px")
})
}else if(plot.method == "interactive") {
output$cor_heatmap <- shiny::renderUI({
plotly::plotlyOutput(outputId = session$ns("interactive"))
shinycssloaders::withSpinner(plotly::plotlyOutput(outputId = session$ns("interactive")), proxy.height = "800px")
})
}

Expand Down
4 changes: 2 additions & 2 deletions R/heatmap.R
Original file line number Diff line number Diff line change
Expand Up @@ -297,7 +297,7 @@ heatmap <- function(input, output, session, data, types, plot.method = "static",
#render choosen plotUI
if(plot.method == "interactive"){
output$heatmap <- shiny::renderUI({
plotly::plotlyOutput(session$ns("interactive"))
shinycssloaders::withSpinner(plotly::plotlyOutput(session$ns("interactive")), proxy.height = "800px")
})

output$interactive <- plotly::renderPlotly({
Expand All @@ -318,7 +318,7 @@ heatmap <- function(input, output, session, data, types, plot.method = "static",
})
}else{
output$heatmap <- shiny::renderUI({
shiny::plotOutput(session$ns("static"))
shinycssloaders::withSpinner(shiny::plotOutput(session$ns("static")), proxy.height = "800px")
})

output$static <- shiny::renderPlot(
Expand Down
4 changes: 2 additions & 2 deletions R/scatterPlot.R
Original file line number Diff line number Diff line change
Expand Up @@ -224,11 +224,11 @@ scatterPlot <- function(input, output, session, data, types, features = NULL, ma
# select container dependend on plot.method
if(plot.method == "static") {
output$scatter <- shiny::renderUI({
shiny::plotOutput(outputId = session$ns("static"))
shinycssloaders::withSpinner(shiny::plotOutput(outputId = session$ns("static")), proxy.height = "800px")
})
}else if(plot.method == "interactive") {
output$scatter <- shiny::renderUI({
plotly::plotlyOutput(outputId = session$ns("interactive"))
shinycssloaders::withSpinner(plotly::plotlyOutput(outputId = session$ns("interactive")), proxy.height = "800px")
})
}

Expand Down
1 change: 1 addition & 0 deletions exec/heatmap_example.R
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ source("../R/columnSelector.R")
source("../R/transformation.R")
source("../R/heatmap.R")
source("../R/label.R")
source("../R/limit.R")

####Test Data
data <- data.table::as.data.table(mtcars, keep.rowname = "id")
Expand Down

0 comments on commit 37b218f

Please sign in to comment.