powered by
Add a chart title and subtitle.
add_title(g2, ..., position = c("top", "bottom"), tag = htmltools::h1, inherit_padding = TRUE, font_family = NULL)add_subtitle(g2, ..., position = c("top", "bottom"), tag = htmltools::h4, inherit_padding = TRUE, font_family = NULL)
add_subtitle(g2, ..., position = c("top", "bottom"), tag = htmltools::h4, inherit_padding = TRUE, font_family = NULL)
An object of class g2r as returned by g2r.
g2r
Title or subtitle content and style, passed to tag.
tag
Position of title or subtitle, top or bottom.
top
bottom
A valid html tag tag.
Whether to inherits the left padding set on chart object (g2).
left
g2
Font family to use, if NULL sets to default set by conf_font.
NULL
conf_font
# NOT RUN { g2(fruits, asp(fruit, value)) %>% fig_interval() %>% add_title("Fruits") # }
Run the code above in your browser using DataLab