Waterfall Chart
Illustrates the cumulative effect of positive and negative contributions to a final result. This is particularly useful for understanding the drivers of change in financial performance, such as revenue, profit, or cash flow. It helps to visualize the cumulative impact of various factors, such as gains, losses, and adjustments, on the final outcome.
Chart:
Code:
muze
.canvas()
.columns(["month"])
.rows([muze.Operators.share("lowerValue", "upperValue")])
.layers([
{
mark: "bar",
encoding: {
y: "upperValue",
y0: "lowerValue",
color: "type",
},
},
])
.config({
axes: {
x: {
domain: dataset.map((d) => d.month),
name: "Month",
},
y: {
name: "Sales",
},
},
})