Skip to contents

Set chart title and subtitle

Usage

v_labs(vc, title = NULL, subtitle = NULL, x = NULL, y = NULL)

Arguments

vc

An htmlwidget created with vchart().

title

Title for the chart.

subtitle

Subtitle for the chart.

x, y

Axes titles.

Value

A vchart() htmlwidget object.

Examples

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

vchart(table(Class = mpg$class), aes(Class, Freq)) %>%
  v_bar() %>%
  v_labs(
    title = "Title for the chart",
    subtitle = "A subtitle to be placed under the title"
  )