AutoDivSpacing flicker of Axis

A forum dedicated to WPF version of LightningChart Ultimate.

Moderator: Queue Moderators

Post Reply
MirroZV
Posts: 45
Joined: Wed May 13, 2020 10:41 am

AutoDivSpacing flicker of Axis

Post by MirroZV » Tue Apr 04, 2023 5:09 am

Hello we encounter issue with 10.4.1.1 version of LC.
Issue is that during continuous rendering of graph, number of divisions shown on graph axis is not stable. While time continues, range of values is rising, therefore divisions are shown with less and less precision. Which is good. But in some points it is probably hard to decide what precision should be used, so it will flicker back and forth between two precisions, and also adds 2xMajor Divisions for a second. This is the issue we had.

I will attach video of issue, it is easiest way t see it.

We have tried manipulate AutoDivSeparationPercent and AutoFormatLabels, but we were not able to mitigate this issue

ArctionKestutis
Posts: 555
Joined: Mon Mar 14, 2016 9:22 am

Re: AutoDivSpacing flicker of Axis

Post by ArctionKestutis » Tue Apr 04, 2023 10:23 am

If you want, you can send video or other attachments directly to Support email box. Forum may have some limitation to file size.
However, I probably know that you mean. LightningChart 'auto' mode tries to calculate best ticks and labels layout. This calculation is based on labels string size, overlap consideration and other factors. For scrolling XAxis those calculation done for each frame and sometime lead to flickering. Flickering is manifested as change between count of labels. This most like due to change in length of reference label-string or margins size.

There are few tips how to avoid flickering.
First, if you see chart's margins fluctuation, you should consider fixing their size: disabling AutoAdjustMargins

Code: Select all

            //Disable automatic axis layouts 
            chart.ViewXY.AxisLayout.AutoAdjustMargins = false;
            chart.ViewXY.Margins = new Thickness(80, 10, 30, 26);          // for WPF

            chart.ViewXY.Margins = new Padding(70, 10, 15, 50);             // for WinForms
Second, you could disable Axis.AutoDivSpacing property. User Manual chapter 6.2.6 Divisions describes this option. Basically you would set MajorDiv or MajorDivCount properties to your liking.

Hope this helps.

Post Reply