bc_waterfall: Waterfall plot

Description Usage Arguments

View source: R/bc_waterfall.R

Description

Creates a waterfall plot showing sources of variance as rectangular segments connected by dotted lines

Usage

1
2
3
4
bc_waterfall(.data, labels, values, incremental = TRUE, anchors = NULL,
  anchor.final = TRUE, width = 0.8, fill.values = c("green", "red",
  "navy"), segment.label = TRUE, anchor.label = TRUE,
  text.format = "%.1f")

Arguments

.data

The data frame or tibble containing your data

labels

The column name that you want to use to label the x-axis

values

The column name that you want to include in the plot

incremental

Set to TRUE if the series contains incremental values to plot. Set to FALSE if the series contains actual values and incremental values must be calculated. Default is TRUE.

anchors

(optional) A column name, logical vector, or numeric vector indicating which segments should touch the x-axis.

anchor.final

Whether to anchor the last bar in the waterfall. Default is TRUE.

width

Bar width in units, where 1 means the edges of the bars touch. Default = 0.8.

fill.values

Fill colors to use on waterfall, in order of 'pos', 'neg', 'anchor'. Default is ‘c(’green', 'red', 'navy')'.

segment.label

Show numerical values as text for each non-anchor column? Default is 'TRUE'.

anchor.label

Show numerical values as text for each anchor column? Default is 'TRUE'.

text.format

Format to use to display text values as a text string. Uses ‘sprintf()'. Default is ’%.1f', which rounds the number to one decimal place.


Prometheus77/bcgg documentation built on Oct. 16, 2019, 12:09 a.m.