chart_line_faceted: Reusable function to create a line chart

View source: R/clus_explorer_utils_reports.R

chart_line_facetedR Documentation

Reusable function to create a line chart

Description

Reusable function to create a line chart

Usage

chart_line_faceted(
  data,
  x_var,
  y_var,
  color_var,
  facet_chart = FALSE,
  facet_vars = NULL,
  facet_scales = "free",
  facet_nrow = 3,
  facet_ncol = 3,
  xlab = "",
  ylab = "",
  is_plotly = FALSE,
  add_x_intercept = FALSE,
  x_intercept = 0,
  add_y_intercept = FALSE,
  y_intercept = 0,
  legend_position = "bottom",
  strip.position = "top",
  labeller_data = c(),
  height = 600
)

Arguments

data

Data to be plotted

x_var

X-axis variable

y_var

Y-axis variable

color_var

Colour variable

facet_chart

Should the chart be faceted

facet_vars

Facet variables

facet_scales

Should scales be fixed ("fixed", the default), free ("free"), or free in one dimension ("free_x", "free_y")?

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

add_x_intercept

Whether to add vertical intercept line

x_intercept

Position of vertical intercept line

add_y_intercept

Whether to add horizontal intercept line

y_intercept

Position of vertical horizontal line

legend_position

Legend position

labeller_data

Facet labeller data

height

Chart height

strip_position

Facet strip position


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