base
of the Waterfall Plot¶import pandas as pd
from lets_plot import *
from lets_plot.bistro import *
LetsPlot.setup_html()
data = {
"Accounts": ["Product revenue", "Services revenue", "Fixed costs", "Variable costs"],
"Values": [830_000, 290_000, -360_000, -150_000],
}
waterfall_plot(data, "Accounts", "Values", hline=element_line()) + theme_minimal()
prev_period_total = 400_000
waterfall_plot(data, "Accounts", "Values", base=prev_period_total, hline=element_line()) + theme_minimal()