Create grid of charts with ApexCharts, currently it’s possible to:
Current limitations are :
apexfacetOutput()
and renderApexfacet()
)Create a grid of charts with ax_facet_wrap()
:
data("mpg", package = "ggplot2")
apex(mpg, aes(displ, cty), type = "scatter") %>%
ax_facet_wrap(vars(drv), ncol = 2)
Synchronized line charts with free y-axis :
data("unhcr_ts")
refugees <- unhcr_ts %>%
subset(population_type == "Refugees (incl. refugee-like situations)") %>%
transform(date = as.Date(paste0(year, "-01-01")))
apex(refugees, aes(date, n), type = "line", synchronize = "sync-it") %>%
ax_yaxis(tickAmount = 5, labels = list(formatter = format_num("~s"))) %>%
ax_xaxis(tooltip = list(enabled = FALSE)) %>%
ax_tooltip(x = list(format = "yyyy")) %>%
ax_facet_wrap(vars(continent_origin), scales = "free_y")