% Generated by roxygen2: do not edit by hand % Please edit documentation in R/bar.R \name{bar} \alias{bar} \title{Simple bar chart} \usage{ bar( df, x, y, group = "", add_color = color("dark_grey"), flip = TRUE, wrap = NULL, position = "dodge", alpha = 1, x_title = NULL, y_title = NULL, group_title = NULL, title = NULL, subtitle = NULL, caption = NULL, width = 0.5, add_text = TRUE, add_text_size = 5, add_text_color = color("dark_grey"), add_text_font_face = "plain", add_text_threshold_display = 0.05, add_text_suffix = "\%", add_text_expand_limit = 1.2, add_text_round = 1 ) } \arguments{ \item{df}{A data frame.} \item{x}{A quoted numeric column.} \item{y}{A quoted character column or coercible as a character column.} \item{group}{Some quoted grouping categorical column, e.g. administrative areas or population groups.} \item{add_color}{Add a color to bars (if no grouping).} \item{flip}{TRUE or FALSE. Default to TRUE or horizontal bar plot.} \item{wrap}{Should x-labels be wrapped? Number of characters.} \item{position}{Should the chart be stacked? Default to "dodge". Can take "dodge" and "stack".} \item{alpha}{Fill transparency.} \item{x_title}{The x scale title. Default to NULL.} \item{y_title}{The y scale title. Default to NULL.} \item{group_title}{The group legend title. Default to NULL.} \item{title}{Plot title. Default to NULL.} \item{subtitle}{Plot subtitle. Default to NULL.} \item{caption}{Plot caption. Default to NULL.} \item{width}{Bar width.} \item{add_text}{TRUE or FALSE. Add values as text.} \item{add_text_size}{Text size.} \item{add_text_color}{Text color.} \item{add_text_font_face}{Text font_face.} \item{add_text_threshold_display}{Minimum value to add the text label.} \item{add_text_suffix}{If percent is FALSE, should we add a suffix to the text label?} \item{add_text_expand_limit}{Default to adding 10% on top of the bar.} \item{add_text_round}{Round the text label.} \item{theme_fun}{Whatever theme function. For no custom theme, use theme_fun = NULL.} \item{scale_impact}{Use the package custom scales for fill and color.} } \description{ Simple bar chart }