6.4.3 Waterfall Chart
1. Vertical Waterfall Chart
import plotly.graph_objects as go
fig = go.Figure(go.Waterfall(
name = "Company A", orientation = "v",
measure = ["relative", "relative", "total", "relative", "relative", "total"],
x = ["Sales", "Consulting", "Net revenue", "Purchases", "Other expenses", "Profit before tax"],
textposition = "outside",
text = ["+60", "+80", "", "-40", "-60", "Total"],
y = [60, 80, 0, -40, -20, 0],
connector = {"line":{"color":"black"}},
))
fig.update_layout(
title = "Profit and loss statement 2020",
showlegend = True)
fig.show()
2. Horizontal Waterfall Chart

Last updated