WPF Charting Documentation - SciChart WPF Charts SDK v5.x
The Digital Line Series Type

Digital (Step) Line Series are provided by the FastLineRenderableSeries type, when the FastLineRenderableSeries.IsDigitalLine property is true.

To declare a FastLineRenderableSeries with DigitalLine flag, use the following code:

Declare a FastLineRenderableSeries in Xaml / Code Behind

Declare a FastLineRenderableSeries
Copy Code
<!-- where xmlns:s="http://schemas.abtsoftware.co.uk/scichart" -->
<s:SciChartSurface>

    <s:SciChartSurface.RenderableSeries>
        <s:FastLineRenderableSeries x:Name="lineSeries" AntiAliasing="True"
                                     StrokeThickness="1" StrokeDashArray="2 2"
                                     Stroke="OrangeRed" IsDigitalLine="True"/>
    </s:SciChartSurface.RenderableSeries>

    <!--  XAxis, YAxis omitted for brevity  -->

</s:SciChartSurface>

// Code Behind, e.g. in OnLoaded event handler, set the DataSeries
var dataSeries = new XyDataSeries<double, double>();
for(int i = 0; i < 100; i++)
       dataSeries.Append(i, Math.Sin(i*0.2));
lineSeries.DataSeries = dataSeries;

Declare a FastLineRenderableSeries in Pure Code

Declare a FastLineRenderableSeries
Copy Code
// Declare the scichartsurface
var sciChartSurface = new SciChartSurface();
// ...
// Declare and add a Line Series
var lineSeries = new FastLineRenderableSeries()
{
    Stroke = Colors.OrangeRed,
    StrokeThickness = 2,
    AntiAliasing = true,
    StrokeDashArray = new double[] { 2, 2 },
    IsDigitalLine = true,
};
sciChartSurface.RenderableSeries.Add(lineSeries);

// Set some data
var dataSeries = new XyDataSeries<double, double>();
for(int i = 0; i < 100; i++)
    dataSeries.Append(i, Math.Sin(i*0.2));
lineSeries.DataSeries = dataSeries;

 

NOTE: You can also declare RenderableSeries using full MVVM (series ViewModels). Please see MVVM DataSeries / RenderableSeries API for more details.

See Also

 

 


SCICHART ® is a Registered Trademark in the UK, US and EEC. Copyright SciChart Ltd 2011-2018.

Email us to give feedback!