fullPlot: Use plot as background

Description Usage Arguments Author(s) Examples

Description

Use a reactive plot as section or slide background.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
fullSectionPlot(
  outputId,
  ...,
  menu = NULL,
  center = FALSE,
  background = "rgba(255,255,255,0.5)"
)

fullSlidePlot(
  outputId,
  ...,
  menu = NULL,
  center = FALSE,
  background = "rgba(255,255,255,0.5)"
)

pageSectionPlot(
  outputId,
  ...,
  menu = NULL,
  center = FALSE,
  background = "rgba(255,255,255,0.5)"
)

multiSectionPlot(
  outputId,
  ...,
  menu = NULL,
  center = FALSE,
  background = "rgba(255,255,255,0.5)"
)

Arguments

outputId

id passed to plotOutput.

...

any children element.

menu

menu link.

center

whether to center text horizontally.

background

sets background to overlaying shiny inputs, set to NULL to remove.

Author(s)

John Coene, jcoenep@gmail.com

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
if(interactive()){

library(shiny)

ui <- fullPage(
  opts = list(sectionsColor = c('#4BBFC3', '#7BAABE')),
  fullSection(h1("Full section plots"), center = TRUE),
  fullSectionPlot(
    "myPlot2",
    center = TRUE,
    fullContainer(
      h2("With a title")
    )
  ),
  fullSectionPlot(
    "myPlot",
    center = TRUE,
    fullContainer(
      h3("Layer anything you want"),
      selectInput(
        "select",
        "Choose y",
        choices = c("mpg", "drat", "wt")
      )
    )
  )
)

server <- function(input, output){

  output$myPlot <- renderPlot({
    plot(1:nrow(mtcars), mtcars[[input$select]])
  })

  output$myPlot2 <- renderPlot({
    plot(1:nrow(mtcars), mtcars[[input$select]])
  })

}

shinyApp(ui, server)
}

RinteRface/fullPage documentation built on Sept. 2, 2021, 2:27 a.m.