AG Studio Launch Week 🚀🚀🚀 28 Sep - 2 Oct 2026 🚀🚀🚀 Join now

JavaScript ChartsWaterfall Series

Version 14.2.0
Enterprise

A Waterfall Series shows the cumulative effect of sequential positive or negative data values. It utilises rising and falling bars to create a cascading waterfall effect.

Simple Waterfall Copy Link

The Waterfall Series is designed to display a single series and is created using the waterfall series type.

{
    series: [
        {
            type: 'waterfall',
            xKey: 'financials',
            yKey: 'amount',
        },
    ],
}

The xKey defines categories for the Category Axis, and the yKey supplies numerical values for the Number Axis.

Legend toggling is disabled in Waterfall Series to avoid misleading or incorrect data representation.

Total / Subtotal Values Copy Link

Adding Total and Subtotal values at specific points in a Waterfall Series can make the data easier to interpret. These values are automatically calculated based on the following criteria:

  • Total: Accumulates all values from the starting point (zero) up to the current point.
  • Subtotal: Begins at the last Total or Subtotal and sums up to the current point.

Total and Subtotal values are added to the totals array within the series options object.

{
    series: [
        {
            type: 'waterfall',
            xKey: 'financials',
            yKey: 'amount',
            totals: [
                { totalType: 'subtotal', index: 4, axisLabel: 'Total Revenue', itemId: 'total-revenue' },
                { totalType: 'subtotal', index: 9, axisLabel: 'Total Expenditure', itemId: 'total-expenditure' },
                { totalType: 'total', index: 9, axisLabel: 'Total Borrowing', itemId: 'total-borrowing' },
            ],
        },
    ],
}

In this configuration:

  • totalType specifies whether the value is a Total or Subtotal.
  • index determines the position in the data after which the Total or Subtotal will appear.
  • axisLabel is the label shown as a category on the Category Axis.
  • itemId is an optional unique identifier for the total, surfaced in events and callbacks. Totals that share an axisLabel must each set a unique itemId to remain distinguishable.

Customisation Copy Link

Series Items Copy Link

Series items are customised via the item configuration object.

{
    series: [
        {
            type: 'waterfall',
            xKey: 'financials',
            yKey: 'amount',
            item: {
                positive: {
                    fill: '#4A90E2',
                    stroke: '#4A90E2',
                },
                negative: {
                    fill: '#FF6B6B',
                    stroke: '#FF6B6B',
                },
                total: {
                    name: 'Total / Subtotal',
                    fill: '#404066',
                    stroke: '#404066',
                },
            },
        },
    ],
}

In this configuration:

  • positive and negative change Positive/Negative series items.
  • total changes Total/Subtotal series items.

Note that the total series item also contains a name property to change the total name to 'Total / Subtotal' in the Total legend item and tooltips.

Connector Lines Copy Link

Connector lines between the bars can be customised using the line property.

{
    series: [
        {
            type: 'waterfall',
            xKey: 'financials',
            yKey: 'amount',
            line: {
                strokeWidth: 4,
                stroke: 'red',
            },
        },
    ],
}

To remove the connector lines, set line.enabled to false.

Horizontal Waterfall Copy Link

To show a Horizontal Waterfall Series, set direction: 'horizontal'.

{
    series: [
        {
            type: 'waterfall',
            direction: 'horizontal',
            xKey: 'financials',
            yKey: 'amount',
        },
    ],
}

When the direction is 'horizontal' the xKey values will be plotted on the default y axis, while the yKey values will be plotted on the default x axis. values along the x-axis.

Waterfall Chart Examples Copy Link

See more Waterfall Chart examples in the AG Charts Gallery.

API Reference Copy Link

Properties available on the AgWaterfallSeriesOptions interface.

type required 'waterfall'
Configuration for the Waterfall Series.
xKey required DatumKey
The key to use to retrieve x-values from the data.
yKey required DatumKey
The key to use to retrieve y-values from the data.
totals WaterfallSeriesTotalMeta[]
Configuration of total and subtotal values.
id string default: auto-generated value
Primary identifier for the series. This is provided as `seriesId` in user callbacks to differentiate multiple series. Auto-generated ids are subject to future change without warning, if your callbacks need to vary behaviour by series please supply your own unique `id` value.
context ContextDefault
Context object to use in callbacks.
data DatumDefault[]
The data to use when rendering the series. If this is not supplied, data must be set on the chart instead.
visible boolean
Whether to display the series.
cursor string
The cursor to use for hovered markers. This config is identical to the CSS `cursor` property.
highlight AgHighlightOptions
Configuration for highlighting when a series or legend item is hovered over.
nodeClickRange InteractionRange
Range from a node that a click triggers the listener.
showInLegend boolean
Whether to include the series in the legend.
listeners AgSeriesListeners
A map of event names to event listeners.
xKeyAxis string default: 'x'
The key of the x-axis to which this series is bound.
yKeyAxis string default: 'y'
The key of the y-axis to which this series is bound.
xName string
A human-readable description of the x-values. If supplied, this will be shown in the default tooltip and passed to the tooltip renderer as one of the parameters.
yName string
A human-readable description of the y-values. If supplied, this will be shown in the default tooltip and passed to the tooltip renderer as one of the parameters.
direction 'horizontal' | 'vertical'
Bar rendering direction. __Note:__ This option affects the layout direction of X and Y data values.
item AgWaterfallSeriesItem
Configuration used for the waterfall series item types.
line AgWaterfallSeriesLineOptions
Configuration for the connector lines.
tooltip AgSeriesTooltip
Series-specific tooltip configuration.
width PixelSize
Fixed width of each bar in the series.
widthRatio Ratio
Ratio of the bandwidth (or specified width) to use for the width for each bar in the series.
showInMiniChart boolean
Whether to include the series in the Mini Chart.