3

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

komodosp
  • 3,316
  • 2
  • 30
  • 59

1 Answers1

2

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>
Bradley Uffner
  • 16,641
  • 3
  • 39
  • 76
  • Spot on! Although the article is out of date. The HighQualityRenderSurface is now available in all editions and DirectX can be enabled with fallback to software via the DirectXHelper.TryApplyDirectX attached property. Finally DirectX is available in Enterprise (formerly source) and SDK editions as of SCv4. Thanks! [scichart team] – Dr. Andrew Burnett-Thompson Apr 10 '16 at 12:15
  • `The member "RenderSurface" is not recognized or is not accessible.` - is this because I have the trial version? – komodosp Apr 14 '16 at 08:50
  • Shouldnt be. There is no difference between trial and full, just time limit – Dr. Andrew Burnett-Thompson Apr 29 '16 at 09:22