bar_chart_waterfall {tidycharts} | R Documentation |
Generate horizontal waterfall chart.
Description
Generate horizontal waterfall chart.
Usage
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
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)
[Package tidycharts version 0.1.3 Index]