Skip to contents

Specify configuration options for a vchart().

Usage

v_specs(vc, ..., serie_id = NULL, drop_nulls = FALSE)

Arguments

vc

An htmlwidget created with vchart().

...

List of options to specify for the chart, see https://www.visactor.io/vchart/option/.

serie_id

Used to set or modify options for a chart where there are multiple series. You can use :

  • a numeric to target the position of the serie in the order where it's added to the chart

  • a character to refer to a serie_id set when the serie was added to the plot.

drop_nulls

Drop NULL elements from the options.

Value

A vchart() htmlwidget object.

Examples

library(vchartr)
data("mpg", package = "ggplot2")

vchart(table(Class = mpg$class)) %>%
  v_bar(aes(Class, Freq)) %>%
  v_specs(
    label = list(visible = TRUE),
    color = list("firebrick")
  )