hc_add_dependency: Add modules or plugin dependencies to highcharts objects

View source: R/highcharts-api-add.R

hc_add_dependencyR Documentation

Add modules or plugin dependencies to highcharts objects

Description

Add modules or plugin dependencies to highcharts objects

Usage

hc_add_dependency(hc, name = "plugins/annotations.js")

Arguments

hc

A highchart htmlwidget object.

name

The partial path to the plugin or module, example: "plugins/annotations.js"

Details

See vignette("modules")

Examples


data(mpg, package = "ggplot2")

hchart(mpg, "point", hcaes(displ, hwy),
  regression = TRUE,
  regressionSettings = list(type = "polynomial", order = 5, hideInLegend = TRUE)
) %>%
  hc_add_dependency("plugins/highcharts-regression.js")

hchart(mpg, "point", hcaes(displ, hwy, group = drv), regression = TRUE) %>%
  hc_colors(c("#d35400", "#2980b9", "#2ecc71")) %>%
  hc_add_dependency("plugins/highcharts-regression.js")

jbkunst/highcharter documentation built on March 14, 2024, 12:52 a.m.