SciChart® the market leader in Fast WPF Charts, WPF 3D Charts, and now iOS Charting & Android Chart Components

Welcome to the SciChart Community Forums!

Please use the forums below to ask questions about SciChart. Take a moment to read our Question asking guidelines on how to ask a good question and our support policy. We also have a tag=SciChart on Stackoverflow.com where you can earn rep for your questions!

Please note: SciChart team will only answer questions from customers with active support subscriptions. Expired support questions will be ignored. If your support status shows incorrectly, contact us and we will be glad to help.

1
0

I have an application that is using 20 fastrederableseries for the purpose of high-speed stripcharting. With only one series visible, the chart fails to render at 20ms intervals. It is very sporadic between 20-150 ms. I have searched the forums and completed the following to improve performance:

resamplingmode = mid
antialiasing = false
renderpriority = low
strokethickness = 1 (although this is too small)

None of these changes resolve the stutter or speed limitations. If I move to a different screen where the chart is not located, speed is no longer an issue. I believe the rendering is slowing things down. How can I imporve this?

Chart XAML:

<s:SciChartSurface x:Name="sciStripChart" Padding="400,45,10,5" s:ThemeManager.Theme="ExpressionDark" Margin="0,0,0,0" RenderPriority="Normal">
      <s:SciChartSurface.RenderSurface>
                 <!-- High Quality subpixel rendering -->
                 <s:HighQualityRenderSurface/>
                  </s:SciChartSurface.RenderSurface> 
                  <s:SciChartSurface.XAxis>
                  <s:NumericAxis x:Name="xAxis" AxisTitle="Time (seconds)" AutoRange="Never" DrawMinorGridLines="False" IsStaticAxis="True" TextFormatting="0.#">
                  </s:NumericAxis>
                  </s:SciChartSurface.XAxis>
                  <s:SciChartSurface.YAxis>
                  <s:NumericAxis x:Name="yAxis"  AxisTitle="Awesomeness (A)" AutoRange="Never" DrawMinorGridLines="False" />
                         </s:SciChartSurface.YAxis>
                        <s:SciChartSurface.ChartModifier>
                                   <s:ModifierGroup>

                                   </s:ModifierGroup>
                      </s:SciChartSurface.ChartModifier>
</s:SciChartSurface>

20 data series created in code using this:

// Create a DataSeries and append some data
var dataSeries = new XyDataSeries<double, double>();
 // Create a RenderableSeries and ensure DataSeries is set
 var renderSeries = new FastLineRenderableSeries
{
         StrokeThickness = 1,
         AntiAliasing = false,
         ResamplingMode = Abt.Controls.SciChart.Numerics.ResamplingMode.Mid,

          SeriesColor = fdctCollection[fdctCollection.Count - 1].color,
          DataSeries = dataSeries,
};

    renderSeries.DataSeries.SeriesName = "Tag " + (z+1);
     // Add the new RenderableSeries
    sciStripChart.RenderableSeries.Add(renderSeries);
    sciStripChart.RenderableSeries[fdctCollection.Count - 1].IsVisible = fdctCollection[fdctCollection.Count - 1].PenEnable;

Attempting to append data and adjust the x-axis every 20 ms:

sciStripChart.RenderableSeries[CurrentPointCount].DataSeries.XValues.Add(CurrentTimeCounter);
sciStripChart.RenderableSeries[CurrentPointCount]DataSeries.YValues.Add(NewYaxisData);

 sciStripChart.RenderableSeries[0].XAxis.AnimatedVisibleRange = (new DoubleRange(CurrentTimeCounter- 100, ((CurrentTimeCounter-0.4))));
  • You must to post comments
1
0

Hi Robert,

It’s very difficult to tell without running a profiler over the code, although I have spotted you are using the HighQualityRenderSurface, which does provide excellent quality lines, but its not very fast.

Some questions.

  1. What version of SciChart are you using?
  2. Is your data sorted, or unsorted in X?
  3. How is the speed when enabling the HighSpeedRenderSurface (right now you have HighQuality enabled. Just remove the SciChartSurface.RenderSurface element entirely to switch back to HighSpeedRenderSurface)
  4. Have you tried the Direct3D10RenderSurface, which is considerably faster in many cases?
  5. Failing all the above to solve the problem, can you provide profiler snapshot (e.g. dotTrace Performance, Ants Profiler) or a code sample we can test out on our side?

Please see this article for info on how to switch renderers.

Best regards,
Andrew

  • Robert Murchison
    1.) 3.41.0.6431 2.) X is sorted. Represents time that is ticking upwards at a 20 ms interval . 3.) HighSpeedRenderSurface works better. 4.) The Direct3D10RenderSurface is by far the best solution, although it comes as a high CPU Usage and I can no longer use my designer with the Abt.Controls.SciChart3D.WPF dll referenced. It produces the follow error:Invalid XmlnsDeclaration occurs in assembly 'Abt.Controls.SciChart3D.Wpf, Version=3.41.0.6431, Culture=neutral, PublicKeyToken=b55dd9efe817e823'. XmlnsDeclaration references a namespace 'Abt.Controls.SciChart3D' that is not in the assembly.Any ideas on what is causing this? I saw one other person had this issue but did not see a resolution. Greatly appreciate the support.Also looking into a possible issue with my data collection routine that may be having an impact. Instead of ticking a timer to achieve datacollection intervals (very poor timer accuracy at 20ms), I am calling a method, executing the data collection, then telling a new thread to sleep x amount of time to ensure accurate intervals. Thus far this method proved to be very reliable/accurate, but with the addition of additional rendering, it may be causing issue.
  • Andrew
    Hi Robert, we haven't reproduced the XmlnsDeclaration error, but we are using VS2013 Update 5. Some people have reported errors in VS2010 but the WPF designer is pretty buggy in the latest version of Visual Studio let alone 2010 ...If you can pass us a code sample we will be very happy to profile it and investigate performance better. Most often a few tweaks can make all the difference as SciChart at its core is a high performance chart!Best regards, Andrew
  • Andrew
  • You must to post comments
Showing 1 result
Your Answer

Please first to submit.