Skip to content

Instantly share code, notes, and snippets.

View yogat3ch's full-sized avatar
🏠
Working from home

Stephen Synchronicity yogat3ch

🏠
Working from home
View GitHub Profile
@helgasoft
helgasoft / area.item.style.R
Last active April 8, 2022 22:06
R | ECharts | areaStyle and itemStyle, click event
library(dplyr)
library(lubridate)
# add event for clicking on blank area
jscode <- c('','',"chart.getZr().on('click', function(e) {
if (!e.target) alert('blank area: '+JSON.stringify(e.event)); });")
set.seed(421)
df1 <- tibble(date= as_date("2021-11-01") + months(0:11),
x= 12*10^6 + rnorm(12,0,2000000),
y= 12*10^6 + rnorm(12,0,1000000))