All docs
V19.2
19.2
19.1
The page you are viewing does not exist in version 19.1. This link will take you to the root page.
18.2
The page you are viewing does not exist in version 18.2. This link will take you to the root page.
18.1
The page you are viewing does not exist in version 18.1. This link will take you to the root page.
17.2
The page you are viewing does not exist in version 17.2. This link will take you to the root page.

WaterfallAbsoluteValueOptions Class

Stores settings for a waterfall chart that is plotted based on absolute data source values.

Namespace: DevExpress.Xpf.Charts

Assembly: DevExpress.Xpf.Charts.v19.2.dll

Declaration

public class WaterfallAbsoluteValueOptions :
    WaterfallValueOptionsBase
Public Class WaterfallAbsoluteValueOptions
    Inherits WaterfallValueOptionsBase

Remarks

Use the WaterfallAbsoluteValueOptions when the chart data source stores absolute values. In this case, the chart control automatically calculates differences between neighbor data point values and displays them as rising and falling bars.

Example

This example shows how to create a waterfall chart based on absolute values.

Markup

<Window
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
        xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
        xmlns:local="clr-namespace:WatefallChart"
        xmlns:dxc="http://schemas.devexpress.com/winfx/2008/xaml/charts" x:Class="WatefallChart.MainWindow"
        mc:Ignorable="d"
        Title="MainWindow" Height="600" Width="800">
    <Grid>
        <dxc:ChartControl Height="315" Width="560">
            <dxc:ChartControl.Legends>
                <dxc:Legend Visible="False"/>
            </dxc:ChartControl.Legends>
            <dxc:XYDiagram2D>
                <dxc:WaterfallSeries2D.ValueOptions>
                    <dxc:WaterfallAbsoluteValueOptions ShowTotal="True"
                                                       TotalLabel="Total">
                        <dxc:WaterfallAbsoluteValueOptions.Subtotals>
                            <dxc:Subtotal PointIndex="2" Label="Subtotal"/>
                        </dxc:WaterfallAbsoluteValueOptions.Subtotals>
                    </dxc:WaterfallAbsoluteValueOptions>
                </dxc:WaterfallSeries2D.ValueOptions>
                <dxc:WaterfallSeries2D DisplayName="Waterfall" 
                                       DataSource="{Binding}"
                                       ArgumentScaleType="Qualitative"
                                       ArgumentDataMember="Argument"
                                       ValueDataMember="Value" 
                                       CrosshairLabelPattern="{}{VABS}">
                </dxc:WaterfallSeries2D>
            </dxc:XYDiagram2D>
        </dxc:ChartControl>
    </Grid>
</Window>

Code-behind:

using System.Collections.Generic;
using System.Windows;

namespace WatefallChart {
    /// <summary>
    /// Interaction logic for MainWindow.xaml
    /// </summary>
    public partial class MainWindow : Window {
        public MainWindow() {
            InitializeComponent();
            this.DataContext = DataLoader.GetDataPoints();
        }
    }
    class DataLoader {
        public static List<DataPoint> GetDataPoints() {
            List<DataPoint> list = new List<DataPoint> {
                new DataPoint("November", 20),
                new DataPoint("December", 10),
                new DataPoint("January", -15),
                new DataPoint("February", 10),
                new DataPoint("March", -10)
            };
            return list;
        }
    }
    public class DataPoint {
        public string Argument { get; private set; }
        public double Value { get; private set; }
        public DataPoint(string arg, double val) {
            Argument = arg;
            Value = val;
        }
    }
}
See Also