Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

echarts4rBox

Box


Description

Renders a data box in shiny.

Usage

echarts4rBox(
  data,
  x,
  y,
  text = "",
  subtext = "",
  type = c("bar", "line", "scatter", "area", "step"),
  ...,
  color = "#ffffff",
  text_color = "#ffffff",
  background_color = "#293c55",
  step = c("start", "middle", "end"),
  title_args = list(),
  tooltip = list(trigger = "axis")
)

Arguments

data

A dataframe containing data to plot.

x, y

Bare column name of variables to draw.

text, subtext

Title and subtitle of box.

type

Chart type to draw.

...

Additional arguments to pass to the serie.

color

Color of chart in box.

text_color

Color of text.

background_color

Color of box.

step

Step method, only used if type = "step".

title_args

Additional arguments to add to the title.

tooltip

Tooltip to use.

See Also

Examples

library(shiny)

ui <- fluidPage(
  fluidRow(
    column(3, echarts4rBoxOutput("box1"))
  )
)

server <- function(input, output) {
  output$box1 <- renderEcharts4rBox({
    echarts4rBox(cars, speed, dist, "Cars", type = "bar")
  })
}
## Not run: 
shinyApp(ui, server)

## End(Not run)

echarts4r

Create Interactive Graphs with 'Echarts JavaScript' Version 5

v0.4.0
Apache License (>= 2.0)
Authors
John Coene [aut, cre, cph], Wei Su [ctb], Helgasoft [ctb], Xianying Tan [ctb] (<https://orcid.org/0000-0002-6072-3521>)
Initial release
2021-03-05

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.