diff --git a/DESCRIPTION b/DESCRIPTION index 3fd21f4..3930653 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -45,6 +45,7 @@ Imports: shiny, heatmaply, shinyBS, shinythemes, + shinycssloaders, log4r RoxygenNote: 6.0.1 biocViews: diff --git a/R/featureSelector.R b/R/featureSelector.R index 80af4d4..2be9965 100644 --- a/R/featureSelector.R +++ b/R/featureSelector.R @@ -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")) ) diff --git a/R/geneView.R b/R/geneView.R index 3aba4f4..55f64c0 100644 --- a/R/geneView.R +++ b/R/geneView.R @@ -334,9 +334,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") } }) diff --git a/R/global_cor_heatmap.R b/R/global_cor_heatmap.R index e196d60..db472ed 100644 --- a/R/global_cor_heatmap.R +++ b/R/global_cor_heatmap.R @@ -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") }) } diff --git a/R/heatmap.R b/R/heatmap.R index 74aab83..b4ce0b2 100644 --- a/R/heatmap.R +++ b/R/heatmap.R @@ -302,7 +302,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({ @@ -325,7 +325,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( diff --git a/R/scatterPlot.R b/R/scatterPlot.R index d72befa..844a51d 100644 --- a/R/scatterPlot.R +++ b/R/scatterPlot.R @@ -226,11 +226,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") }) } diff --git a/exec/heatmap_example.R b/exec/heatmap_example.R index 771c75e..9f32763 100644 --- a/exec/heatmap_example.R +++ b/exec/heatmap_example.R @@ -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")