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

Scatter Series are provided by the XyScatterRenderableSeries type, which requires a PointMarker.

NOTE: For a detailed description of the PointMarker API, see Section Point Marker API-BaseRenderableSeries.Pointmarker

PointMarker Types available in SciChart include:

To declare a Scatter Series with PointMarker use the following code:

Declare an XyScatterRenderableseries With EllipsePointMarker in Xaml / Code Behind

Declare an XyScatterRenderableseries With EllipsePointMarker
Copy Code
<!-- where xmlns:s="http://schemas.abtsoftware.co.uk/scichart" -->
<s:SciChartSurface>

   <s:SciChartSurface.RenderableSeries>
       <s:XyScatterRenderableSeries x:Name="scatterSeries" Stroke="OrangeRed">
             <s:XyScatterRenderableSeries.PointMarker>
                    <s:EllipsePointMarker Stroke="White" StrokeThickness="2"
                                            Fill="OrangeRed" Width="7" Height="7"/>
             </s:XyScatterRenderableSeries.PointMarker>
       </s:XyScatterRenderableSeries>
    </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));
scatterSeries.DataSeries = dataSeries;

Declare an XyScatterRenderableSeries with EllipsePointMarker in Pure Code

Declare an XyScatterRenderableSeries with EllipsePointMarker
Copy Code
// Declare the scichartsurface
var sciChartSurface = new SciChartSurface();
// ...
// Declare and add a Scatter Series
var scatterSeries = new XyScatterRenderableSeries()
{
    Stroke = Colors.OrangeRed,
    PointMarker = new EllipsePointMarker() { Stroke = Colors.OrangeRed,
               StrokeThickness = 2, Fill = Colors.OrangeRed} },
};
sciChartSurface.RenderableSeries.Add(scatterSeries);

// Set some data
var dataSeries = new XyDataSeries<double, double>();
for(int i = 0; i < 100; i++)
    dataSeries.Append(i, Math.Sin(i*0.2));
scatterSeries.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 EEC. Copyright SciChart Ltd 2011-2018.

Email us to give feedback!