Pre loader

WPF Digital Band Series Chart

WPF Chart - Examples

SciChart WPF ships with hundreds of WPF Chart Examples which you can browse, play with, view the source-code and even export each WPF Chart Example to a stand-alone Visual Studio solution. All of this is possible with the new and improved SciChart WPF Examples Suite, which ships as part of the SciChart WPF SDK.

Download the SDK

This WPF chart can generate a digital Band Series chart in code, by using a FastBandRenderableSeries with the IsDigitalLine property set to true. The band series requires an XyyDataSeries, which contains one X-point and two Y-points.

Dual lines are drawn by Stroke, StrokeY1 and shaded bands are drawn using FillY1 and Fill, depending on whether Y1 is greater than Y2.

Tip!

If you have data where Y1 is greater than Y2 always, you’ll get an envelope effect. Great for rendering confidence intervals, error margins or Bollinger Bands!

Documentation Links

FastBandRenderableSeries Type
XyyDataSeries Type
What is a RenderableSeries?
DataSeries Types in SciChart
Common RenderableSeries Properties

Want to create this WPF Digital Band Series Chart?

The C#/WPF source code for the WPF digital band series chart example is included below.

You can also view the source code from one of the following sources:

  1. Clone the SciChart.WPF.Examples from Github.
  2. Or, view source in the SciChart WPF Examples suite.
  3. Also, the SciChart WPF Trial contains the full source for the examples.

Download the examples or begin your free trial today.

How to get started

Ready to get started with your free 30-day trial? Read our Getting Started guide before you do – it teaches you how to…

  1. Begin your free trial
  2. Create charts with tutorials
  3. Compile example source code
  4. Access documentation

Bring your big-data visualizations to life with a free trial of SciChart.WPF. No credit card details required.

Get Started With Your Free Trial Today

Why use SciChart?

Designed for big-data and real-world applications, we’re the preferred charting software for enterprises across the globe. In fact, SciChart provides the world’s fastest WPF charts, with DirectX Hardware Acceleration. We provide endless customizations and pair our exceptional chart applications with 5-star rated tech support.

  • Fast rendering for real-time data feeds
  • Supports endless customisable & interactive features
  • 5-star rated support for developers
  • Winner of the Queen’s Award for Innovation
  • Extensive features built for complex charts
  • Responsive across all devices, including mobile & tablet
  • 98% of users recommend SciChart

Frequently Asked Questions

Are your WPF Digital Band Series Charts fully responsive?

Yes. Our charts are designed to offer maximum visibility and performance even when displayed on smaller screens, such as tablets and smartphones. You can also display large volumes of real-time data and multiple charts in the UI without any stalling.

What customizations are available?

We provide endless customizations for our WPF charts. You can use our ready-made customizations within the Theme Manager or build your own from scratch. That way, you have complete control over the finished appearance of your chart, including colors.

What tech support is available for developers?

SciChart provides world-class tech support. Got a question? Contact our support team for advice: https://www.scichart.com/contact-us/. You can also access thousands of support forums and advice online.

The C#/WPF source code for the WPF Digital Band Series Chart example is included below (Scroll down!).

Did you know you can also view the source code from one of the following sources as well?

  1. Clone the SciChart.WPF.Examples from Github.
  2. Or, view source in the SciChart WPF Examples suite.
  3. Also the SciChart WPF Trial contains the full source for the examples (link below).

DOWNLOAD THE WPF CHART EXAMPLES

DigitalBandSeriesChartExampleView.xaml
View source code
<UserControl x:Class="SciChart.Examples.Examples.CreateSimpleChart.DigitalBandSeriesChartExampleView"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:s="http://schemas.abtsoftware.co.uk/scichart"
             xmlns:ext="http://schemas.abtsoftware.co.uk/scichart/exampleExternals"
             Loaded="DigitalBandSeriesChartExampleView_OnLoaded"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008"             
             d:DesignHeight="400"
             d:DesignWidth="600"
             mc:Ignorable="d">

    <Grid>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="Auto" />
            <ColumnDefinition Width="*" />
        </Grid.ColumnDefinitions>

        <!-- The SciChartInteractionToolbar adds zoom, pan, zoom extents and rotate functionality -->
        <!-- to the chart and is included for example purposes. -->
        <!-- If you wish to know how to zoom and pan a chart then do a search for Zoom Pan in the Examples suite! -->
        <ext:SciChartInteractionToolbar TargetSurface="{Binding Source={x:Reference Name=sciChart}}" />

        <!--  Create the chart surface  -->
        <s:SciChartSurface Name="sciChart"
                           Grid.Column="1"
                           Padding="0"
                           BorderThickness="0">

            <!--  Declare RenderableSeries  -->
            <s:SciChartSurface.RenderableSeries>
                <s:FastBandRenderableSeries x:Name="bandRenderSeries"
                                            Fill="#33279B27"
                                            FillY1="#33FF1919"
                                            IsDigitalLine="True"
                                            StrokeY1="#FF279B27"
                                            Stroke="#FFFF1919">
                    <s:FastBandRenderableSeries.SeriesAnimation>
                        <s:SweepAnimation AnimationDelay="0:0:1" Duration="0:0:1"/>
                    </s:FastBandRenderableSeries.SeriesAnimation>
                </s:FastBandRenderableSeries>
            </s:SciChartSurface.RenderableSeries>

            <!--  Create an X Axis  -->
            <s:SciChartSurface.XAxis>
                <!--  Note, initial VisibleRange is set for display purposes only. Leave this unset to autorange once on startup  -->
                <s:NumericAxis x:Name="xAxis" VisibleRange="1.1, 2.7" DrawMajorBands="True" />
            </s:SciChartSurface.XAxis>

            <!--  Create a Y Axis with GrowBy  -->
            <s:SciChartSurface.YAxis>
                <s:NumericAxis DrawMajorBands="True">
                    <s:NumericAxis.GrowBy>
                        <s:DoubleRange Max="0.1" Min="0.1" />
                    </s:NumericAxis.GrowBy>
                </s:NumericAxis>
            </s:SciChartSurface.YAxis>

        </s:SciChartSurface>

    </Grid>
</UserControl>
DigitalBandSeriesChartExampleView.xaml.cs
View source code
// *************************************************************************************
// SCICHART® Copyright SciChart Ltd. 2011-2022. All rights reserved.
//  
// Web: http://www.scichart.com
//   Support: support@scichart.com
//   Sales:   sales@scichart.com
// 
// DigitalBandSeriesChartExampleView.xaml.cs is part of the SCICHART® Examples. Permission is hereby granted
// to modify, create derivative works, distribute and publish any part of this source
// code whether for commercial, private or personal use. 
// 
// The SCICHART® examples are distributed in the hope that they will be useful, but
// without any warranty. It is provided "AS IS" without warranty of any kind, either
// expressed or implied. 
// *************************************************************************************
using System.Windows;
using System.Windows.Controls;
using SciChart.Charting.Model.DataSeries;
using SciChart.Examples.ExternalDependencies.Data;

namespace SciChart.Examples.Examples.CreateSimpleChart
{
    /// <summary>
    /// Interaction logic for BandSeriesChartExampleView.xaml
    /// </summary>
    public partial class DigitalBandSeriesChartExampleView : UserControl
    {
        public DigitalBandSeriesChartExampleView()
        {
            InitializeComponent();
        }

        private void DigitalBandSeriesChartExampleView_OnLoaded(object sender, RoutedEventArgs e)
        {
            // Add a data series which handles X-Y0-Y1 data
            var dataSeries = new XyyDataSeries<double, double>();

            // Get some reference data to display
            var data = DataManager.Instance.GetDampedSinewave(1.0, 0.01, 1000);
            var moreData = DataManager.Instance.GetDampedSinewave(1.0, 0.005, 1000, 12);

            // Append data to series. SciChart automatically redraws
            dataSeries.Append(
                data.XData,
                data.YData, 
                moreData.YData);

            bandRenderSeries.DataSeries = dataSeries;
        }
    }
}
Back to WPF Chart Examples