apexcharter-shiny-grid: Shiny bindings for grid with apexcharter

Description Usage Arguments Value Examples

Description

Output and render functions for using apexcharter grid within Shiny applications and interactive Rmd documents.

Usage

1
2
3
apexgridOutput(outputId)

renderApexgrid(expr, env = parent.frame(), quoted = FALSE)

Arguments

outputId

output variable to read from

expr

An expression that generates a apexcharter grid.

env

The environment in which to evaluate expr.

quoted

Is expr a quoted expression (with quote())? This is useful if you want to save an expression in a variable.

Value

An Apexcharts output that can be included in the application UI.

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
library(shiny)
library(apexcharter)

ui <- fluidPage(
  
  tags$h2("Apexcharts Grid Example"),
  
  apexgridOutput("myfacet")
  
)

server <- function(input, output, session) {
  
  output$myfacet <- renderApexgrid({
    a1 <- apex(mpg, aes(manufacturer), type = "bar")
    a2 <- apex(mpg, aes(trans), type = "column")
    a3 <- apex(mpg, aes(drv), type = "pie")
    
    apex_grid(
      a1, a2, a3, 
      grid_area = c("1 / 1 / 3 / 2", "1 / 2 / 2 / 4", "2 / 2 / 3 / 4"),
      ncol = 3, 
      nrow = 2,
      height = "600px"
    )
  })
  
}

if (interactive())
  shinyApp(ui, server)

apexcharter documentation built on May 11, 2021, 5:05 p.m.