echarty

April 16, 2026 ยท View on GitHub

R-CMD-check coverage size website twitter

echarty.gallery

This package is a thin R wrapper around Javascript library ECharts.
One major command(ec.init) uses R lists to support the ECharts API.
Benefit from ECharts full functionality and build interactive charts in R and Shiny with minimal overhead.

Wider connectivity and deployment potential through WebR and crosstalk.

Compare to echarts4r ๐Ÿ“Œ
R packageecharts4recharty
initial commitMar 12, 2018Feb 5, 2021
library size875 KB275KB
test coverage32% link98% link
lines of code1,202,681 link6,951 link
echarts.js version5.4.3 link6.0.0 link
API designown commands with parametersmostly ECharts option lists (1)
number of commandsover 200one command (ec.init) + optional utility commands
dataset supportnoyes
WebR supportnoyes
crosstalk supportnoyes
column-to-stylenoyes
dependencies (tools)7046
dependencies (WebR)18846

(1) We encourage users to follow the original ECharts API to construct charts with echarty. This differs from echarts4r which uses own commands for most chart options.

Comparison review done October 2025 for current versions of echarts4R and echarty.


Please consider granting a Github star โญ to show your support.

Installation

Latest development build 1.7.3

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

CRAN
status From CRAN:

install.packages('echarty')

Examples

library(echarty); library(dplyr)

#  scatter chart (default)
cars |> ec.init()

#  parallel chart
ToothGrowth |> ec.init(ctype= 'parallel')

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

#  timeline of two series with grouping, formatting, autoPlay
iris |> group_by(Species) |> 
ec.init(
  timeline= list(autoPlay= TRUE),
  series.param = list(
    symbolSize= ec.clmn('Petal.Width', scale= 9),
    encode= list(x= 'Sepal.Width', y='Petal.Length'),
    markLine= list(data= list(list(type='max'), list(type='min')))
  )
)

# show a remote map chart, needs package leaflet installed
echarty::ec.fromJson('https://helgasoft.github.io/echarty/test/pfull.json')

Get started

The Coder is a good introduction, type library(echarty); demo(coder).
The WEBSITE has a vast gallery with code and tutorials.
The package itself has code examples included. Now you can start building beautiful ECharts with R and Shiny!


Polar Stack timeline bars themeRiver 3D
rose pie map stacked grouped bars

Made with echarty. Powered by ECharts.