SciChart WPF 3D Charts > 3D Chart Types > The Waterfall 3D Chart Type
The Waterfall 3D Chart Type

Examples for the Waterfall 3D Chart can be found in the SciChart WPF Examples Suite which can be downloaded from the SciChart Website or our SciChart.WPF.Examples Github Repository.

The Waterfall 3D Chart renders a two-dimensional array as a series of slices. The WaterfallRenderableSeries3D type provides a number of configurable chart types in SciChart 3D, including:

  •    
  • Dynamic updating slices for visualizing spectra (Acoustic or radio frequency domain data)
  • Volumetric slices
  • Optional PointMarkers at data-points.

 

 

Declaring a Waterfall 3D Chart

To declare a Waterfall 3D Chart with SciChart, use the following code:

<s3D:SciChart3DSurface x:Name="SciChart" 
                       BorderThickness="0"
                       WorldDimensions="200,100,200">
  <s3D:SciChart3DSurface.Camera>
    <s3D:Camera3D ZoomToFitOnAttach="True" />
  </s3D:SciChart3DSurface.Camera>
  <s3D:SciChart3DSurface.RenderableSeries>
    <s3D:WaterfallRenderableSeries3D x:Name="WaterfallSeries" Stroke="#AA3333FF" Opacity="0.8" StrokeThickness="1" SliceThickness="1">       
        <s3D:WaterfallRenderableSeries3D.ZColorMapping>
             <s3D:GradientColorPalette x:Key="GradientColorPalette" IsStepped="False">
                <s3D:GradientColorPalette.GradientStops>
                  <GradientStop Offset="0" Color="Red"/>
                  <GradientStop Offset="0.25" Color="Orange"/>
                  <GradientStop Offset="0.5" Color="Yellow"/>
                  <GradientStop Offset="0.75" Color="Green"/>
                  <GradientStop Offset="1" Color="DarkGreen"/>
                </s3D:GradientColorPalette.GradientStops>
              </s3D:GradientColorPalette>
        </s3D:WaterfallRenderableSeries3D.ZColorMapping>
    </s3D:WaterfallRenderableSeries3D>
  </s3D:SciChart3DSurface.RenderableSeries>
  <s3D:SciChart3DSurface.XAxis>
    <s3D:NumericAxis3D/>
  </s3D:SciChart3DSurface.XAxis>
  <s3D:SciChart3DSurface.YAxis>
    <s3D:NumericAxis3D/>
  </s3D:SciChart3DSurface.YAxis>
  <s3D:SciChart3DSurface.ZAxis>
    <s3D:LogarithmicNumericAxis3D TextFormatting="#.#E+0"
                                  LogarithmicBase="10"
                                  AutoRange="Always"
                                  ScientificNotation="LogarithmicBase"/>
  </s3D:SciChart3DSurface.ZAxis>
private void OnLoaded(object sender, RoutedEventArgs routedEventArgs)
{
    var pointsPerSlice = 100;
    var sliceCount = 20;
    var logBase = 10;
    var slicePositions = new double[sliceCount];
    for (int i = 0; i < sliceCount; ++i)
    {
        slicePositions[i] = Math.Pow(logBase, i);
    }
   
    var dataSeries = new WaterfallDataSeries3D<double>(pointsPerSlice, slicePositions) { SeriesName = "Waterfall" };
    dataSeries.StartX = 10;
    dataSeries.StepX = 1;
    for (int sliceIndex = 0; sliceIndex < sliceCount; ++sliceIndex)
    {       
        for (var pointIndex = 0; pointIndex < pointsPerSlice; pointIndex++)
        {           
            dataSeries[sliceIndex, pointIndex] = // TODO Create some data to apply to the waterfall chart// ;
        }
    }
    WaterfallSeries.DataSeries = dataSeries;
}

 

Data is stored in the WaterfallDataSeries3D Type. This represents a 2-dimensional array of arrays (or 2D Jagged array) typically of type Double (but can be defined with generics). It also accepts an array of spacings to define where the slices exist in the Z-direction (see slicePositions above).

 

Some important points to note:

 

More info on paletting or styling 3D Waterfall series can be found in the article Applying Palettes to Waterfall 3D Charts

 

 

See Also