WPF Charting Documentation - SciChart WPF Charts SDK v5.x
The Digital (Step) Mountain Series Type

Digital (Step) Mountain Series are provided by the FastMountainRenderableSeries type, when the FastMountainRenderableSeries.IsDigitalLine property is true. This draws a polygon between the X-Y line and the ZeroLineY, a constant Y-value (defaults to zero).

To declare a FastMountainRenderableSeries with Digital Line use the following code:

Declare a FastMountainRenderableSeries in Xaml / Code Behind

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

    <s:SciChartSurface.RenderableSeries>
        <s:FastMountainRenderableSeries x:Name="mountainSeries" AntiAliasing="True"
                                    StrokeThickness="1"
                                    IsDigitalLine="True"
                                    Stroke="White"
                                    ZeroLineY="0.0"
                                    Fill="#33FF6600"/>
    </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));
mountainSeries.DataSeries = dataSeries;

Declare a FastMountainRenderableSeries in Pure Code

Declare a FastMountainRenderableSeries
Copy Code
// Declare the scichartsurface
var sciChartSurface = new SciChartSurface();
// ...
// Declare and add a Mountain Series
var mountainSeries = new FastMountainRenderableSeries()
{
    Stroke = Colors.White,
    Fill = new SolidColorBrush(Color.FromArgb(0x33, 0xFF, 0x66, 0x00)),
    StrokeThickness = 2,
    AntiAliasing = true,
    ZeroLineY = 0.0,
    IsDigitalLine = true,
};
sciChartSurface.RenderableSeries.Add(mountainSeries);

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

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


See Also

Renderable Series APIs

 

 


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

Email us to give feedback!