Last active
February 16, 2026 23:29
-
-
Save helgasoft/e914fe6f4a9ed9407f78e41cb18b3aaa to your computer and use it in GitHub Desktop.
echarty announcements and temporary notes
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #' This gist is for echarty announcements and notes | |
| #' Comments are temporary, periodically deleted. | |
| #' If you like echarty, please consider granting a Github star ⭐. | |
| remotes::install_github('helgasoft/echarty') # get latest | |
| library(echarty) | |
| #------ segmentedDoughnut with ECharts v.6+ ----- | |
| ec.init( | |
| load= 'https://cdn.jsdelivr.net/gh/apache/echarts-custom-series@main/custom-series/segmentedDoughnut/dist/index.auto.js', | |
| ask= 'loadRemote', | |
| series.param= list( | |
| type= 'custom', renderItem= 'segmentedDoughnut', | |
| coordinateSystem= 'none', | |
| itemPayload= list( | |
| radius= list('50%','65%'), segmentCount= 8, | |
| label= list(show=T, formatter= '{c}/{b}', fontSize=35, color= '#555') | |
| ), | |
| data= list(5) ) | |
| ) |
Author
Author
@mdneuzerling, here is how to draw series with disparate data sets with echarty.
dat1 <- seq.Date(from = as.Date("2023-01-01"), by= 2, length.out = 100)
dat2 <- seq.Date(from = as.Date("2023-01-02"), by= 2, length.out = 100)
d1 <- data.frame(date= dat1, value= cumsum(rnorm(100, mean = 0.5, sd= 2)) + 50)
d2 <- data.frame(date= dat2, value= cumsum(rnorm(100, mean = 0.4, sd= 2)) + 30)
ec.init(
dataset= list(
list(source= ec.data(d1)),
list(source= ec.data(d2))
),
series= list(
list(type='line', name='s1', datasetIndex=1, showSymbol=F),
list(type='line', name='s2', datasetIndex=2, showSymbol=F)
),
xAxis= list(type='time'), legend= list(top=11), tooltip= list(trigger= 'axis'), dataZoom= list(show=T)
)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
@bpfaff, thank you for pointing out the error in EChart's new violin chart. We opened an issue in their repo.


The echarty violin chart has no problem with negative values:
do.call(ec.init, ec$violin(PlantGrowth_NegativeValues, cname='group', cvalue='weight', jitter=0.1))do.call(ec.init, ec$violin(warpbreaks, cname='wool', cvalue='breaks', jitter=0, j.itemStyle= list(color='chartreuse'), m.symbolSize=8)) |> ec.theme('dark-mushroom')