# Waterfallchart

## Purpose & Application

Commonly called the Mario Chart because of the bricks in suspension, the Waterfall is a great way to provide a quick visual into positive and negative changes to a value over a period of time or stages.

> 📝 For example, what products have been driving my sales up in the last month?

A waterfall chart is easily used to show how an initial value is affected by intermediate totals values, positive or negative, and then resulting in a final value.

It can reveal the composition of a result.

For example, this chart can be useful to understand the impact of different stores on the overall income of a company in supermarkets.

This chart can also be useful to:

* Visualize profit and loss statements
* Evaluate company profit
* Highlight budget changes
* Keep track of inventory
* Compare product earnings

## Key Features

*What makes this graph a killer story?*

* 🚦 **Color coding** makes it easy to identify best/worst performer without even reading the numbers. Plus it can be easily reversed.

> In our case I can clearly tell that Europe is performing very well, but France not so good…

* **Automatically calculated variation** between the two points : in value and %, don’t need to have it in your data.

> Without asking or doing anything I can see that my revenue increased by 151.6%! Which represents 97 M$

* **Smooth drill functionality** makes it easy on the eye, your user will love it! Add a drill to your waterfall to go in a deeper level of detail 🔎.

> How easy is it to get the Europe global performance then see the details for each country!

* Easily add **intermediate totals** within your charts.

> I’m a financial manager, I want to see the total before taxes and the total after taxes

* **Possibility to add much more info** ℹ️ like variation, current value, meta information can help you turn a 5 slides information into just one viz.

> No need for footnotes or attachment anymore, everything is right here under my nose.

## Configuration

<mark style="color:red;">**\***</mark>**Mandatory paramers**

| Section      | Option                                                   | Description                                                                                     |
| ------------ | -------------------------------------------------------- | ----------------------------------------------------------------------------------------------- |
|              | Dataset<mark style="color:red;">**\***</mark>            | Select the dataset used by the chart                                                            |
|              | Label<mark style="color:red;">**\***</mark>              | Select the column that contains the text label to display                                       |
|              | Value<mark style="color:red;">**\***</mark>              | Select the column that contains the value to display                                            |
|              | Groups type/levels<mark style="color:red;">**\***</mark> | Select the column that contains labels relationship \| Data should look like: -1/parent/child   |
| Sort         | Labels order                                             | Order labels based on a column, on an advanced order or a custom order                          |
| Drill        | Parent Label                                             | Select the column that contains parent group labels                                             |
| Drill        | Parent's Order                                           | Order parents based on a column, on an advanced order or a custom order                         |
| Enrich Chart | Variation                                                | Display a variation badge next to the value based on a column containing the variations         |
| Enrich Chart | Additional Info                                          | Select a column that contains an addition information that will be displayed under each labels  |
| Enrich Chart | Add Steps                                                | Create intermediate steps. This will rely on the bars’ order                                    |
| Display      | Hide Evolution Legend                                    | Hide evolution auto generated next to the Highlighted KPI                                       |
| Display      | Hide Highlighted KPI                                     | Hide the Highlighted KPI auto generated                                                         |
| Display      | Reverse Automatic Sentiment Color                        | By default, value above 0 are in green, and below in red. Enable this option to do the opposite |
| Display      | Baseline                                                 | Define the minimum value for all bars                                                           |
| Display      | Size                                                     | Define the chart size when having multiple ones                                                 |
| Display      | Mobile Size                                              | Define the chart size when having multiple ones on mobile                                       |
| Display      | Custom Class                                             | Set a custom CSS class to target this specific chart with CSS                                   |
| Tutorial     | Tutorial                                                 | Set a tutorial to help your users to understand the chart by giving him an id and a message     |

## Expected Data Structure

{% hint style="info" %}
**Tips**

Use YouPrep™ operator **Waterfall** in the **Reshape** section to adapt your dataset for the waterfallchart.
{% endhint %}

**Example without drill**

| label   | parent\_label | group\_level | value | var   |
| ------- | ------------- | ------------ | ----- | ----- |
| N-1     | N-1           | -1           | 100   |       |
| Europe  | Europe        | parent       | -20   | -0,04 |
| Asia    | Asia          | parent       | 40    | 0,1   |
| America | America       | parent       | 30    | 0,02  |
| N       | N             | -1           | 150   |       |

**Example with drill**

| label   | parent\_label | group\_level | value | var   | order | revenue |
| ------- | ------------- | ------------ | ----- | ----- | ----- | ------- |
| N-1     | N-1           | -1           | 100   |       | 0     | 250     |
| Europe  | Europe        | parent       | -20   | -0,04 | 2     | -50     |
| France  | Europe        | child        | -10   | -0,03 | 3     | -25     |
| Germany | Europe        | child        | -15   | -0,1  | 5     | -38     |
| UK      | Europe        | child        | 5     | 0,02  | 4     | 13      |
| Asia    | Asia          | parent       | 40    | 0,1   | 6     | 100     |
| India   | Asia          | child        | 25    | 0,01  | 8     | 63      |
| China   | Asia          | child        | 15    | 0,05  | 7     | 38      |
| Africa  | Africa        | parent       | 15    | 0,2   | 9     | 38      |
| America | America       | parent       | 30    | 0,02  | 10    | 75      |
| USA     | America       | child        | -10   | -0,03 | 12    | -25     |
| Canada  | America       | child        | 10    | 0,06  | 11    | 25      |
| Mexico  | America       | child        | 30    | 0,01  | 13    | 75      |
| N       | N             | -1           | 165   |       | 14    | 413     |


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs-v3.toucantoco.com/visualizations-and-layouts/creating-visualizations/viz-gallery/legacy-viz-designs/waterfallchart.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
