Intro
Waterfall charts are used to analyze a cumulative value. They show how the cumulative value changes from an initial state to a final state by representing the accumulation of successive values.
Examples
Profit and Loss
The margin is a cumulative value equal to the sum of all revenues (positive) and all costs (negative).
Profit and loss waterfall chart
Inventory over Time
The stock level is equal to the sum of all incoming stocks (positive) and outgoing stocks (negative).
Stock level over time waterfall chart
Orientation
The orientation of the waterfall chart (horizontal or vertical) should follow best practices of the business area from which the application is designed.
If the chart represents how a cumulative value changes over time period, it’s best to use a vertical waterfall chart (with vertical bars) and a horizontal time axis.
If not, you should use a horizontal waterfall chart (with horizontal bars) to avoid the undesirable effects that come as a result of displaying the category labels at 45°, which apart from making them hard to read, often leads to truncation of text.
Total and Subtotal
Waterfall chart with an intermediate total
Waterfall chart with an intermediate subtotal
Colors
Default Colors
By default, the chart use three colors based on the following semantic:
- Positive values use a color defined by the property: plotArea.dataPoint.color.positive.
- Negative values use a color defined by the property: plotArea.dataPoint.color.negative
- Totals use a color defined by the property: plotArea.dataPoint.color.total
By default, these three colors are:
- Blue (@sapUiChartPaletteSequentialHue1Light1)
- Green (@sapUiChartPaletteSequentialHue2Light1)
- Gray (@sapUiChartPaletteSequentialNeutral)
These colors are defined by the sequential palette, but can be customized.
Waterfall chart with default colors
Custom Colors
You can customize the colors in two ways:
- Change the colors, or
- Use your own rules.
Changing Colors
The colors color.positive, color.negative and color.total can be changed to any color from the chart palette. The chart will use these three colors based on the rules defined above.
Example: Positive and negative are blue, and total by gray.
Waterfall chart with custom colors
Waterfall chart with semantic colors
Using your Own Rules
You can set any color to any bar based on your own rules. To define the rules, use the property dataPointStyle:rules.
Use dataPointStyle:others to define the colors for all data points that are not covered by the rules. If the color of a data point is not defined, the data point will be displayed with a black color to indicate that no color has been defined.
Waterfall chart with colors based on business rules
[internal_only]
Planned Features
Stacked waterfall chart: Each intermediate positive or negative values can be split in multiple values, like in a stacked chart.
Periodic waterfall chart: This chart is dedicated to show a cumulative value over time. In addition,it allows to clearly visualize each period with multiple measures in each period to correctly display the date in a responsive way, .
[/internal_only]
Resources
Want to dive deeper? Follow the links below to find out the SAPUI5 implementation.
Elements and Controls
- Chart (guidelines)
- Chart – Color Palettes (guidelines)
Implementation
- Horizontal Waterfall Chart (SAPUI5 samples)
- Vertical Waterfall Chart (SAPUI5 samples)
Visual Design
- No links.