recharts-shiny: Wrapper functions for Shiny

Description Usage Arguments Examples

Description

Use eChartOutput() to create a container for a ECharts widget in the UI, and renderEChart() to render the widget on the server side.

Usage

1
2
3
eChartOutput(outputId, width = "100%", height = "400px")

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

Arguments

outputId

the output id to be used in the output object on the server side

width

the width of the chart

height

the height of the chart

expr

an R expression to return an EChart widget

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.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
# !formatR
library(recharts)
library(shiny)
app = shinyApp(
  ui = fluidPage(eChartOutput('myChart')),
  server = function(input, output) {
    chart = echart(x = rnorm(100), y = rnorm(100))
    output$myChart = renderEChart(chart)
  }
)

if (interactive()) print(app)

taiyun/recharts documentation built on June 7, 2018, 6:41 p.m.