Skip to contents

Used for both static and interactive line functions.

Usage

generic_line(
  t,
  x,
  y,
  fill,
  est = NULL,
  dec = 0,
  dform = "%b-%Y",
  breaks = NULL,
  lwidth = 1,
  color = "gnbopgy_5",
  title = NULL,
  subtitle = NULL,
  source = "",
  alt = NULL,
  xlabel = NULL,
  ylabel = NULL,
  interactive = FALSE
)

Arguments

t

A tibble or dataframe in long form for plotting

x

The name of the variable you want plotted on the X-Axis

y

The name of the variable you want plotted on the Y-Axis

fill

The name of the variable you want the fill color of the bars to be based on

est

Type for the numeric values - enter "percent", "currency" or "number", defaults to "percent"

dec

Number of decimal points in labels - defaults to 0

dform

Format for Date values

breaks

Break points for a continuous scale or date break description for date scale; default NULL

lwidth

Width of lines, defaults to 1

color

Name of color palette to use - generally defaults to "pgnobgy_5"

title

Title to be used for chart, if desired - defaults to "NULL"

subtitle

Sub-title to be used for chart, if desired - defaults to "NULL"

source

Source reference as character string, if desired - defaults to blank

alt

Text to be used for alt-text, if desired - defaults to "NULL"

xlabel

category-axis title to be used for chart, if desired - defaults to "NULL"

ylabel

numeric-axis title to be used for chart, if desired - defaults to "NULL"

interactive

Enable hover text and other interactive features - defaults to FALSE

Value

line chart

Author

Craig Helmann, Michael Jensen