#!/usr/bin/env python # coding: utf-8 # # Parameter `base` of the Waterfall Plot # In[1]: import pandas as pd from lets_plot import * from lets_plot.bistro import * # In[2]: LetsPlot.setup_html() # In[3]: data = { "Accounts": ["Product revenue", "Services revenue", "Fixed costs", "Variable costs"], "Values": [830_000, 290_000, -360_000, -150_000], } # ## Default View # In[4]: waterfall_plot(data, "Accounts", "Values", hline=element_line()) + theme_minimal() # ## Change Base # In[5]: prev_period_total = 400_000 waterfall_plot(data, "Accounts", "Values", base=prev_period_total, hline=element_line()) + theme_minimal()