Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Waterfall — Running-Total Bridge Chart

Signature

sp.waterfall(title, labels, values, *, variant="basic", show_text=True, **kwargs) -> Chart

Description

sp.waterfall() renders the entire waterfall-chart family: a sequence of bars where each step adds (positive) or subtracts (negative) from a running total. The variant keyword selects the geometry without touching any other parameter. Waterfalls are the standard for P&L bridges, variance analysis, cohort decomposition, fee/tax breakdowns and any "from A to B, what changed?" narrative.

Totals — set a value to 0 and use a label containing total, net, final, gross or ebitda to mark a subtotal bar; it is rendered with the totals color and anchored on the running sum.

Parameters

ParameterUsed by variants
gridlineshorizontal
heighthorizontal
show_textall
titlehorizontal
widthhorizontal

Returns

Chart — object with .html property and .show() method.


Signature

sp.waterfall(title, labels, values, *, variant="basic", show_text=True, **kwargs) -> Chart

Description

sp.waterfall() rassemble toute la famille des graphiques waterfall : une suite de barres ou chaque etape ajoute (positif) ou retranche (negatif) au cumul courant. Le mot-cle variant change la geometrie sans toucher aux autres parametres. Les waterfalls sont la reference pour les ponts de P&L, l analyse d ecarts, la decomposition de cohortes, le detail des frais/taxes et tout recit du type "de A vers B, qu est-ce qui a change ?".

Totaux — mettez la valeur a 0 et utilisez un libelle contenant total, net, final, gross ou ebitda pour marquer une barre de sous-total ; elle est rendue avec la couleur des totaux et ancree sur le cumul courant.

Parametres

ParametreTypeDefautDescription
titlestrrequisTitre du graphique
labelslist[str]requisLibelles des etapes (gauche -> droite)
valueslist[float]requisDeltas par etape (mettez 0 + libelle "total" pour les sous-totaux)
variantstr"basic"Variante geometrique (voir tableau)
show_textboolTrueAfficher les annotations de valeur au-dessus des barres
widthint900Largeur du canvas (px)
heightint480Hauteur du canvas (px)

Retour

Chart — objet avec une propriete .html et une methode .show().