chart_bar_faceted: Reusable function to create a bar chart

View source: R/clus_explorer_utils_reports.R

chart_bar_facetedR Documentation

Reusable function to create a bar chart

Description

Reusable function to create a bar chart

Usage

chart_bar_faceted(
  data,
  x_var,
  y_var,
  facet_chart = FALSE,
  facet_vars = NULL,
  facet_nrow = 3,
  facet_ncol = 3,
  xlab = "",
  ylab = "",
  is_plotly = FALSE,
  scale_x_continuous_limits = c(),
  scale_x_continuous_breaks = c(),
  legend_position = "bottom",
  height = 600
)

Arguments

data

Data to be plotted

x_var

X-axis variable

y_var

Y-axis variable

facet_chart

Should the chart be faceted

facet_vars

Facet variables

facet_nrow

Number of facet rows

facet_ncol

Number columns.

xlab

X-axis label

ylab

Y-axis label

is_plotly

Should the chart object be converted to plotly object

scale_x_continuous_limits

Character vector of scale X limits

scale_x_continuous_breaks

Character vector of scale X breaks

legend_position

Legend position

height

Chart height


bcgov/clus_explorer documentation built on Oct. 16, 2022, 1:56 p.m.