SciChart® the market leader in Fast WPF Charts, WPF 3D Charts, and now iOS Charting & Android Chart Components

// 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

// WPF Band Series Chart Example

To see the WPF Band Series Chart example live, or to export source-code to a Visual Studio solution, please download the SciChart WPF Trial and open the following example:


WPF Chart Example | Band Series Chart

SciChart v4 WPF Examples Suite > 2D Charts > Basic Chart Types > Band Series Chart


// Example Description

Generates a simple Band Series chart in code. The FastBandRenderableSeries 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 and what is a DataSeries?
RenderableSeries API


// Source Code

Inside the Band Series Chart example, you can browse the source code and see how we implemented this WPF Chart Example. You can also export any SciChart WPF Chart Example to Visual Studio as a stand-alone project by following the steps from the video below.


scichart-examples-view-example-preview

SciChart v4 WPF Examples Suite > Featured Apps > Financial Charts > Band Series Chart > Click on EXPORT SOLUTION

BandSeriesChartExampleView.xaml

    

        
            
                
                
            
        

    

    
        
            
            
        

        <!-- 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! -->
        


        <!-- Create the chart surface -->
        

            <!-- Declare RenderableSeries -->
            
                
            

            <!-- Create an X Axis -->
            
                <!-- Note, initial VisibleRange is set for display purposes only. Leave this unset to autorange once on startup -->
                
            

            <!-- Create a Y Axis with GrowBy -->
            
                
                    
                        
                    
                
            

        

    

BandSeriesChartExampleView.xaml.cs

// *************************************************************************************
// SCICHART® Copyright SciChart Ltd. 2011-2016. All rights reserved.
//  
// Web: https://www.scichart.com
//   Support: support@scichart.com
//   Sales:   sales@scichart.com
// 
// BandSeriesChartExampleView.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.Core.Extensions;
using SciChart.Examples.ExternalDependencies.Data;

namespace SciChart.Examples.Examples.CreateSimpleChart
{
    ///

    /// Interaction logic for BandSeriesChartExampleView.xaml
    ///

public partial class BandSeriesChartExampleView : UserControl { public BandSeriesChartExampleView() { InitializeComponent(); } private void BandSeriesChartExampleView_OnLoaded(object sender, RoutedEventArgs e) { // Set a DataSeries of type x=DateTime, y0=Double, y1=double on the RenderableSeries declared in XAML var series = new XyyDataSeries<double, double>(); sciChart.RenderableSeries[0].DataSeries = series; // Get some data for the upper and lower band 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 series.Append( data.XData, data.YData, moreData.YData); } } }


< BACK TO ALL WPF CHART EXAMPLES

STAY UPDATED
Signup now and we’ll keep you updated with product developments and you will be notified the moment SciChart iOS Charts is released and available.
STAY UPDATED
Signup now and we’ll keep you updated with product developments and you will be notified the moment SciChart Android Charts is released and available.
THANK YOU
Your details have been received.
We like to make sure we only send information to clients who want to hear from us, so if you check your email now, you will find a confirmation email from us. Please click the confirm link and you'll will be added to our updates.