Commit bc2ff188 authored by dmattek's avatar dmattek
Browse files

Added: loader spinner

parent de7abfd2
...@@ -14,6 +14,7 @@ Following packages need to be installed in order to run the app locally: ...@@ -14,6 +14,7 @@ Following packages need to be installed in order to run the app locally:
* shiny * shiny
* shinyjs * shinyjs
* shinyBS * shinyBS
* shinycssloaders
* data.table * data.table
* DT * DT
* ggplot2 * ggplot2
...@@ -34,7 +35,7 @@ Following packages need to be installed in order to run the app locally: ...@@ -34,7 +35,7 @@ Following packages need to be installed in order to run the app locally:
Install packages using `install.packages('name_of_the_package_from_the_list_above')` command in RStudio command line. Install packages using `install.packages('name_of_the_package_from_the_list_above')` command in RStudio command line.
``` ```
install.packages(c("shiny", "shinyjs", "shinyBS", install.packages(c("shiny", "shinyjs", "shinyBS", "shinycssloaders",
"data.table", "DT", "data.table", "DT",
"ggplot2", "gplots", "plotly", "scales", "grid", "ggplot2", "gplots", "plotly", "scales", "grid",
"dendextend", "RColorBrewer", "dendextend", "RColorBrewer",
......
...@@ -15,6 +15,7 @@ library(Hmisc) # for CI calculation ...@@ -15,6 +15,7 @@ library(Hmisc) # for CI calculation
# Global parameters ---- # Global parameters ----
# if true, additional output printed to R console # if true, additional output printed to R console
DEB = T DEB = T
......
...@@ -166,7 +166,7 @@ clustHierUI <- function(id, label = "Hierarchical CLustering") { ...@@ -166,7 +166,7 @@ clustHierUI <- function(id, label = "Hierarchical CLustering") {
downPlotUI(ns('downPlotHier'), "Download PNG"), downPlotUI(ns('downPlotHier'), "Download PNG"),
actionButton(ns('butPlotHierHeatMap'), 'Plot!'), actionButton(ns('butPlotHierHeatMap'), 'Plot!'),
plotOutput(ns('outPlotHier')) withSpinner(plotOutput(ns('outPlotHier')))
), ),
tabPanel('Averages', tabPanel('Averages',
......
...@@ -174,7 +174,7 @@ clustHierSparUI <- function(id, label = "Sparse Hierarchical CLustering") { ...@@ -174,7 +174,7 @@ clustHierSparUI <- function(id, label = "Sparse Hierarchical CLustering") {
downPlotUI(ns('downPlotHierSparHM'), "Download PNG"), downPlotUI(ns('downPlotHierSparHM'), "Download PNG"),
actionButton(ns('butPlotHierSparHeatMap'), 'Plot!'), actionButton(ns('butPlotHierSparHeatMap'), 'Plot!'),
plotOutput(ns('outPlotHierSpar')) withSpinner(plotOutput(ns('outPlotHierSpar')))
), ),
tabPanel('Averages', tabPanel('Averages',
......
...@@ -97,15 +97,15 @@ modTrajPlot = function(input, output, session, ...@@ -97,15 +97,15 @@ modTrajPlot = function(input, output, session,
output$uiPlotTraj = renderUI({ output$uiPlotTraj = renderUI({
if (input$chBplotTrajInt) if (input$chBplotTrajInt)
plotlyOutput( withSpinner(plotlyOutput(
ns("outPlotTrajInt"), ns("outPlotTrajInt"),
width = paste0(input$inPlotTrajWidth, '%'), width = paste0(input$inPlotTrajWidth, '%'),
height = paste0(input$inPlotTrajHeight, 'px') height = paste0(input$inPlotTrajHeight, 'px'))
) else ) else
plotOutput( withSpinner(plotOutput(
ns("outPlotTraj"), ns("outPlotTraj"),
width = paste0(input$inPlotTrajWidth, '%'), width = paste0(input$inPlotTrajWidth, '%'),
height = paste0(input$inPlotTrajHeight, 'px') height = paste0(input$inPlotTrajHeight, 'px'))
) )
}) })
......
...@@ -7,6 +7,8 @@ ...@@ -7,6 +7,8 @@
library(shiny) library(shiny)
library(shinyjs) #http://deanattali.com/shinyjs/ library(shinyjs) #http://deanattali.com/shinyjs/
library(shinyBS) # for tooltips
library(shinycssloaders) # for loader animations
library(data.table) library(data.table)
library(ggplot2) library(ggplot2)
library(gplots) # for heatmap.2 library(gplots) # for heatmap.2
...@@ -30,6 +32,9 @@ library(pracma) # for trapz ...@@ -30,6 +32,9 @@ library(pracma) # for trapz
# change to increase the limit of the upload file size # change to increase the limit of the upload file size
options(shiny.maxRequestSize = 200 * 1024 ^ 2) options(shiny.maxRequestSize = 200 * 1024 ^ 2)
# colour of loader spinner (shinycssloaders)
options(spinner.color="#00A8AA")
# Server logic ---- # Server logic ----
shinyServer(function(input, output, session) { shinyServer(function(input, output, session) {
useShinyjs() useShinyjs()
......
...@@ -7,8 +7,8 @@ ...@@ -7,8 +7,8 @@
library(shiny) library(shiny)
library(shinyjs) #http://deanattali.com/shinyjs/ library(shinyjs) # http://deanattali.com/shinyjs/
library(shinyBS) library(shinyBS) # for tooltips
shinyUI(fluidPage( shinyUI(fluidPage(
useShinyjs(), useShinyjs(),
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment