Waterfall
The Waterfall chart provides a visual representation of sequential data points, demonstrating the cumulative effect of sequentially occurring positive and negative values. It effectively showcases the step-by-step journey of a value, helping to highlight the major contributions or subtractions along the way. The visualization aids in understanding and analyzing the sequence of events or factors leading to a particular end value.
The Method To Use
The method is s.plt.line_and_bar_charts()
It must contain the following input variables:
data: Union[str, DataFrame, List[Dict]]
order: int
x: str
positive: str
negative: strAnd accepts the following input variables as optional:
rows_size: Optional[int] = None
cols_size: Optional[int] = None
padding: Optional[str] = None
title: Optional[str] = None
x_axis_name: Optional[str] = None
y_axis_name: Optional[str] = None
show_balance: bool = False
option_modifications: Optional[Dict] = None,
variant: Optional[str] = NoneTo generate a Waterfall Chart, your input should be structured as a list of dictionaries. Each dictionary represents a specific date and its corresponding income and expenses.
Here's the format:
Key Components:
'x': Represents the date or any sequential point you want to plot. It should be in string format.
'income': Represents the income for the corresponding date. It should be a positive numeric value. If there's no income for a specific date, input 0.
'expenses': Represents the expenses for the corresponding date. It should be a positive numeric value, even though it's an expense. If there are no expenses for a specific date, input 0.
Once the input is structured in this format, it can be used to generate a Waterfall Chart that visually captures the sequential changes in profit or loss.
Examples
Both examples use this dataset:
The first example uses the basic configuration:

The second example uses the balance:

Variants
By setting the parameter variant to the following values the appearance of the chart can be changed:


Last updated
Was this helpful?