bar_chart_waterfall: Generate horizontal waterfall chart.

Description Usage Arguments Value Examples

View source: R/bar_chart_waterfall.R

Description

Generate horizontal waterfall chart.

Usage

1
2
3
4
5
6
7
bar_chart_waterfall(
  cat,
  series,
  data = NULL,
  add_result = FALSE,
  result_title = NULL
)

Arguments

cat

vector containing category names of values

series

vector containing names of columns in data with values to plot

data

data frame containing data to be plotted

add_result

boolean value if result bar should be plotted

result_title

the title for the result bar. Ignored if add_result is false

Value

object of class tidychart with a character vector containing SVG elements

Examples

1
2
3
4
5
6
df <- data.frame(
  city = c("Berlin", "Munich", "Cologne", "London", "Vienna", "Paris", "Zurich"),
  profit = sin(1:7)
)

bar_chart_waterfall(cat = 'city', series = 'profit', data = df)

tidycharts documentation built on Jan. 18, 2022, 5:07 p.m.