Learn R Programming

vchartr (version 0.1.4)

v_labs: Set chart title and subtitle

Description

Set chart title and subtitle

Usage

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

Value

A vchart()

htmlwidget object.

Arguments

vc

An htmlwidget created with vchart().

title

Title for the chart.

subtitle

Subtitle for the chart.

x, y

Axes titles.

Examples

Run this code
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"
  )

Run the code above in your browser using DataLab