komodosp
komodosp

Reputation: 3618

SciChart FastLineRenderableSeries Anti-Aliasing not working

I have tried setting AntiAliasing to true on a Line Chart (Real Time FIFO) but it doesn't appear to be working. Is there anything else I need to do?

Here is the XAML...

<s:SciChartSurface x:Name="sciChart" Grid.Column="1" GridLinesPanelStyle="{StaticResource GridLinesPanelStyle}" RenderTransformOrigin="0.498,0.48" RenderableSeries="{Binding ChartSeries}">

And the code behind...

    private void AddCurveToChart(XyDataSeries<double, double> curveSeries)
    {

        FastLineRenderableSeries renderableCurve = new FastLineRenderableSeries
        {
            DataSeries = curveSeries,
            Stroke = (Color)ColorConverter.ConvertFromString(Strokes[ChartSeries.Count < Strokes.Length ? ChartSeries.Count : Strokes.Length - 1]),
            StrokeThickness = 2,
            AntiAliasing = true,

        };

        ChartSeries.Add(renderableCurve);

        RaisePropertiesChanged("ChartSeries");
    }

Yet, as you can see from the screenshot, I still get "the jaggies"...

enter image description here

Upvotes: 3

Views: 668

Answers (1)

Bradley Uffner
Bradley Uffner

Reputation: 16991

According to SciChart you need to use one of the High Quality, or DirectX or Vector Renderer plugins in order to get anti-aliased lines. They direct you to this article for more information about the plugins.

  • The HighSpeedRenderSurface An integer coordinate, fast, software renderer (CPU Based). Produces jagged lines but it's very quick.

  • The HighQualityRenderSurface (Available in the Pro and Source Editions) A floating point coordinate software renderer (CPU Based).
    Produces the best quality image, but uses more CPU resources than
    HighSpeed.

  • The Direct3D10RenderSurface (Available in the Source Edition) A floating point, DirectX10 hardware renderer (GPU Based). Utilizes
    pixel shaders to offload as much computation to the GPU as possible.

HighSpeedRenderSurface is used by default, which produces jagged lines.

To enable the HighQualityRenderSurface (only available in pro version):

<s:SciChartSurface>
   <s:SciChartSurface.RenderSurface>
      <s:HighQualityRenderSurface/>
   </s:SciChartSurface.RenderSurface>
</s:SciChartSurface>

The Direct3D10RenderSurface can be used this way (only available in "Source-Code Edition"):

<s:SciChartSurface.RenderSurface>
    <s3D:Direct3D10RenderSurface InitializationFailed="OnDirectXInitializationFailed"
                                 RenderingFailed="OnDirectXRenderingFailed"/>
</s:SciChartSurface.RenderSurface>

Upvotes: 2

Related Questions