Pre loader

Real time graphing drawing graphics issue

Welcome to the SciChart Forums!

  • Please read our Question Asking Guidelines for how to format a good question
  • Some reputation is required to post answers. Get up-voted to avoid the spam filter!
  • We welcome community answers and upvotes. Every Q&A improves SciChart for everyone

WPF Forums | JavaScript Forums | Android Forums | iOS Forums

0
0

Hi,

I am seeing intermittent charting issues when plotting real-time data. The issue seems to be related to programmatic ranging of the x-axis, as I am unable to replicate the behavior when setting AutoRange="Always", and removing the programmatic ranging code.

I captured the behavior in a screen recording that can be viewed in the OneDrive link below (the file was too large to upload in this post). The behavior is replicated at time 0:00:01. To me, it seems like the x-axis was somehow stretched in a section of the chart as the temporal distance between two consecutive data points seems to increase temporarily. In the video you can see that this behavior is transient and seems to rectify quite quickly; scrolling back to the time at which the glitch occurs, there seems to be no abnormalities in the data. The link to the video is below:

Real-time charting issues

Below is the programmatic ranging method I am using:

private void AutoScaleAxes(double latestXPosition)
{
try
{
// force task to run on UI thread if not already
if (Thread.CurrentThread != _dispatcher.Thread)
{
_dispatcher.Invoke(() => AutoScaleAxes(latestXPosition));
}
else
{
var lowerBound = Math.Max(0, latestXPosition – DisplaySeconds);
if (Plots?.FirstOrDefault()?.DataSeries?.ParentSurface?.XAxes.First() is IAxis xaxis) xaxis.VisibleRange = new DoubleRange(lowerBound, latestXPosition);

var blockFirstScaling = _data.First().Count < 100; // don’t auto-scale first time until we have at least 100 data points
var autoScaleY = (_firstScaling && !blockFirstScaling) ? (!AutoScaleYAxis.HasValue) : (AutoScaleYAxis.HasValue && AutoScaleYAxis.Value);
}
}

Any thoughts on what code be causing this? Thanks!

Version
8.6.0.28199
  • Lex
    Hi Jared, Thank you fore reporting this. Please accept my apologies for the delayed response. I am going to discuss the provided information with our team and will get back to you as soon as I have an update. Kind regards, Lex, SciChart Technical Support Engineer
  • Jared Weyer
    Hi Lex, Thanks for getting back to me. Apologies for the multiple post, I thought the original post was unsuccessful as I could not locate it after posting.
  • You must to post comments
0
0

Hi Jared,

Hope you are doing well.
We discussed your inquiry.

As we can see, you use a custom Axis scaling algorithm.
Unfortunately, due to our Support Policy, we do not provide technical support for custom implementations.

We can suggest trying different render plugins, though, as they feature different rendering algorithms under the hood. For example, if you experience the mentioned issue with hardware acceleration, you can avoid it by using a software renderer instead.
Here you can find more details regarding render plugins SciChart offers:
SciChart WPF Documentation – Renderer Plugins _ WPF Chart Documentation

You could also use the AutoRange property set to Always, as you’ve mentioned in your message.

Kind regards,
Lex,
SciChart Technical Support Engineer

  • You must to post comments
Showing 1 result
Your Answer

Please first to submit.