Skip to content

papamic-gr/echarty

 
 

Repository files navigation

echarty

R-CMD-check Coveralls test coverage size website website

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 crosstalk.

Compare to echarts4r 📌
R package echarts4r echarty
initial commit Mar 12, 2018 Feb 5, 2021
library size 878 KB 224KB
test coverage 32% link 93% link
lines of code 1,171,938 link 5,061 link
API design (1) own commands with parameters mostly ECharts option lists
number of commands over 200 one command + optional utilities
data storage support series data datasets, series data
crosstalk support no yes
utilities bezier, correlations, histogram, density, loess, flip, nesting, more extended boxplots, tabsets, layouts, shapefiles, lotties, more

This review done Sept 2023 for echarts4R v.0.4.5 and echarty v.1.5.4.03.

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


Please consider granting a Github star ⭐ to show your support.

Installation

Latest development build 1.6.2.02

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 chart
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 gallery with code and tutorials.
The package itself has plenty of code examples included. Type ?ec.examples, then copy/paste any code to see the chart.

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


Polar Stack

Made with echarty. Powered by ECharts.

About

Minimal R/Shiny Interface to ECharts.js

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • R 72.6%
  • JavaScript 27.4%