SciChart® the market leader in Fast WPF Charts, WPF 3D Charts, iOS Chart, Android Chart and JavaScript Chart Components
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.
Impulse Series chart
Generates an Impulse-response style chart with optional point-marker in code. The FastImpulseRenderableSeries can be used to render an XyDataSeries, XyyDataSeries (uses Y1 only) or OhlcDataSeries (renders close).
Tip! You can add optional data-point markers to a impulse series using the PointMarker API. This is very performant and uses the same bitmap rendering as our Scatter-Charts.
Documentation Links
– FastImpulseRenderableSeries Type
– XyDataSeries Type
– What is a RenderableSeries?
– DataSeries Types in SciChart
– Common RenderableSeries Properties
The C#/WPF source code for the WPF Impulse (Stem) 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?
<UserControl x:Class="SciChart.Examples.Examples.CreateSimpleChart.ImpulseChartExampleView"
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="ImpulseChartExampleView_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}}" />
<!-- Declare the chart surface -->
<s:SciChartSurface x:Name="sciChart"
Grid.Column="1"
Padding="0"
BorderThickness="0">
<!-- Declare renderable series -->
<s:SciChartSurface.RenderableSeries>
<s:FastImpulseRenderableSeries x:Name="impulseRenderSeries" Stroke="#0066FF">
<!-- Declare an optional point marker at the tip of each line -->
<s:FastImpulseRenderableSeries.PointMarker>
<s:EllipsePointMarker Width="5"
Height="5"
Fill="#0066FF" />
</s:FastImpulseRenderableSeries.PointMarker>
<s:FastImpulseRenderableSeries.SeriesAnimation>
<s:ScaleAnimation AnimationDelay="0:0:1" Duration="0:0:1" ZeroLine="0"/>
</s:FastImpulseRenderableSeries.SeriesAnimation>
</s:FastImpulseRenderableSeries>
</s:SciChartSurface.RenderableSeries>
<!-- Declare the XAxis -->
<s:SciChartSurface.XAxis>
<s:NumericAxis DrawMajorBands="True" />
</s:SciChartSurface.XAxis>
<!-- Declare the YAxis. Optional bands give a cool look and feel for minimal performance impact -->
<s:SciChartSurface.YAxis>
<s:NumericAxis DrawMajorBands="True" GrowBy="0.1, 0.1" />
</s:SciChartSurface.YAxis>
</s:SciChartSurface>
</Grid>
</UserControl>
// *************************************************************************************
// SCICHART® Copyright SciChart Ltd. 2011-2022. All rights reserved.
//
// Web: http://www.scichart.com
// Support: support@scichart.com
// Sales: sales@scichart.com
//
// ImpulseChartExampleView.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
{
public partial class ImpulseChartExampleView : UserControl
{
public ImpulseChartExampleView()
{
InitializeComponent();
}
private void ImpulseChartExampleView_OnLoaded(object sender, RoutedEventArgs e)
{
var dataSeries = new UniformXyDataSeries<double>(0d, 0.1);
// Substitute for your own data
dataSeries.Append(DataManager.Instance.GetDampedSinewaveYData(1.0, 0.05, 100));
impulseRenderSeries.DataSeries = dataSeries;
// Explicit call to ZoomExtents()
sciChart.ZoomExtents();
}
}
}