Obtains a bar chart for the given variable(s).

dai.bar_chart(
  dataset,
  x_variable_name,
  y_variable_name = NULL,
  transpose = FALSE,
  sort = FALSE,
  mark = "bar",
  render = TRUE,
  progress = getOption("dai.progress", TRUE)
)

Arguments

dataset

DAIFrame representing the dataset.

x_variable_name

Name of the X variable.

y_variable_name

Name of the Y variable (optional).

transpose

Boolean, default value is FALSE.

sort

Boolean, default value is FALSE.

mark

Default value is "bar" (use "point" to get a Cleveland dot plot).

render

Whether to directly render the plot or not

progress

Whether to display a progress bar.

Value

JSON of the plot in Vega format if render=FALSE.