c_title: Title

Description Usage Arguments Examples

View source: R/title.R

Description

Add a title to the chart.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
c_title(
  c,
  title = "",
  position = c("top", "left", "bottom", "right"),
  font_size = 12,
  font_family = helvetica(),
  font_color = "#666",
  font_style = "bold",
  padding = 10,
  line_height = 1.2,
  display = TRUE
)

Arguments

c

An object of class charter as returned by c_hart.

title

Title to display, if a list or a vector of length > 1 text is rendered on multiple lines.

position

The position of the title.

font_size

Font size of text in pixels.

font_family

Font family to use.

font_color

Color of text.

font_style

Font style.

padding

Padding, in pixels, between rows of boxes.

line_height

Height of an individual line of text.

display

Whether to display the title.

Examples

1
2
3
4
5
c_hart(cars, caes(speed, dist)) %>% 
 c_line() %>% 
 c_title(
   c("Title", "Subtitle")
 )

JohnCoene/charter documentation built on Feb. 20, 2022, 11:07 p.m.