echarty icon indicating copy to clipboard operation
echarty copied to clipboard

Minimal R/Shiny Interface to ECharts.js

echarty

R-CMD-check Coveralls test coverage size website

echarty.gallery

This package is a thin R wrapper around Javascript library ECharts. A few commands use R lists to enclose the entire ECharts API. Users can benefit from ECharts full functionality to build interactive charts in R and Shiny with minimal overhead.

Wider connectivity and deployment potential through crosstalk support.

Installation

Latest development version 1.4.7:

if (!requireNamespace('remotes')) install.packages('remotes')
remotes::install_github('helgasoft/echarty')

CRAN
status From CRAN:

install.packages('echarty')

Examples

library(echarty)

#  2D chart
cars |> ec.init()

#  3D chart with GL plugin
iris |> group_by(Species) |> ec.init(load='3D')

# grouping, tooltips, formatting
iris |> group_by(Species) |> 
ec.init(tooltip= list(show= TRUE)) |>   # init with presets
ec.upd({                                # update some
  series <- lapply(series, function(s) { 
    s$symbolSize <- ec.clmn(4, scale=7)
    s$tooltip <- list(formatter= ec.clmn('Petal.Width: %@', 4))
    s })
})

Get started

The WEBSITE has a gallery with code and tutorials.

The package has plenty of code examples included. Type ?ec.examples in the RStudio Console, then copy/paste any code from Help to see the result.

Now you can start building beautiful ECharts (and more) with R and Shiny!


Polar Stack

Made with echarty. Powered by ECharts.