Browse Source

CSS loading widget

Petra Lamborn 5 years ago
parent
commit
c3139a1594
1 changed files with 3 additions and 2 deletions
  1. 3
    2
      app.R

+ 3
- 2
app.R View File

3
 library(scales)
3
 library(scales)
4
 library(tidyverse)
4
 library(tidyverse)
5
 library(readxl)
5
 library(readxl)
6
+library(shinycssloaders)
6
 
7
 
7
 # Original data from 
8
 # Original data from 
8
 # https://catalogue.data.govt.nz/dataset/
9
 # https://catalogue.data.govt.nz/dataset/
36
    # Sector tab ----
37
    # Sector tab ----
37
    tabPanel("By sector",
38
    tabPanel("By sector",
38
                 h3("Emissions by sector"),
39
                 h3("Emissions by sector"),
39
-                plotOutput("secPlot"),
40
+                plotOutput("secPlot") %>% withSpinner(type=5),
40
                 fluidRow(
41
                 fluidRow(
41
                  column(5, offset=1,
42
                  column(5, offset=1,
42
                         h4("Options"),
43
                         h4("Options"),
63
      # Fuel tab ----
64
      # Fuel tab ----
64
      tabPanel("By fuel",
65
      tabPanel("By fuel",
65
               h3("Emissions by fuel"),
66
               h3("Emissions by fuel"),
66
-              plotOutput("fuPlot"),
67
+              plotOutput("fuPlot") %>% withSpinner(type=5),
67
                 fluidRow(
68
                 fluidRow(
68
                  column(5, offset=1,
69
                  column(5, offset=1,
69
                         h4("Options"),
70
                         h4("Options"),