Awesome
<img src='man/figs/logo.png' width='70px' alt='' /> echarty
<!-- badges: start --> <!-- [![CRAN downloads](https://cranlogs.r-pkg.org/badges/last-day/echarty)](https://cranlogs.r-pkg.org/badges/last-day/echarty) --> <!-- badges: end --><a href='https://helgasoft.github.io/echarty'><img src="man/figs/echarty.gallery.png" alt="echarty.gallery" /></a>
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.
<details> <summary><b>Compare to echarts4r</b> 📌</summary>R package | echarts4r | echarty |
---|---|---|
initial commit | Mar 12, 2018 | Feb 5, 2021 |
library size | ||
test coverage | ![]() | ![]() |
lines of code | 1,202,623 ![]() | 5,517 ![]() |
API design <sup>(1)</sup> | own commands with parameters | mostly ECharts option lists |
number of commands | over 200 | one command + optional utility commands |
data storage support | series data | datasets, series data |
dependencies (packrat) | 65 | 40 |
dependencies (WebR) | 188 | 46 |
WebR support | no | yes |
crosstalk support | no | yes |
utilities | bezier, correlations, histogram, density, loess, flip, nesting, more | extended boxplots, tabsets, layouts, shapefiles, lotties, more |
<sup>(1)</sup> 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 Feb 2024 for current versions of echarts4R and echarty.
</details>
Please consider granting a Github star ⭐ to show your support.
Installation
<!-- [![Github version](https://img.shields.io/github/v/release/helgasoft/echarty?label=github)](https://github.com/helgasoft/echarty/releases) <sup>.02</sup> -->Latest development build 1.6.4
if (!requireNamespace('remotes')) install.packages('remotes')
remotes::install_github('helgasoft/echarty')
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 also 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!
<br> <p align="center"> <a href='https://helgasoft.github.io/echarty/gallery.html' target='_blank'> <img src="man/figs/ssPolarStack.png" alt="Polar Stack" width="180"/> <img src="man/figs/ssBars.gif"/> <img src="man/figs/ssThemeRiver.png" width="180"/> <img src="man/figs/ssBunny.gif"/> <br> <!-- img src="man/figs/ssMorph.gif" width="180"/ --> <img src="man/figs/ssRose.png" width="180"/> <img src="man/figs/ssSpeed.png" width="180"/> <img src="man/figs/ssStackBar.png" width="180"/> </a> <br>Made with echarty. Powered by ECharts. </p>