BeforeZooming: Ranges not updated after cancel was called

Found a possible bug in LightningChart? Report it here.

Moderator: Queue Moderators

Post Reply
frank
Posts: 51
Joined: Tue Mar 25, 2014 9:04 am

BeforeZooming: Ranges not updated after cancel was called

Post by frank » Tue Jul 08, 2014 10:14 am

Hi,

I have another strange behavior in BeforeZooming with LC WPF.

Code: Select all

        void BeforeZooming(List<RangeChangeInfo> xRanges, List<RangeChangeInfo> yRanges, bool byWheel, ref bool cancel)
        {
            //foreach (RangeChangeInfo rci in xRanges)
            //{
            //    System.Diagnostics.Debug.Print("{0} BeforeZooming() {1}..{2} -> {3}..{4}", DateTime.Now.ToString(), rci.OldMin, rci.OldMax, rci.NewMin, rci.NewMax);
            //}
            IsZooming = !(xRanges[0].NewMin == ZoomXMin && xRanges[0].NewMax == ZoomXMax);
            if (IsZooming)
            {
                if (xRanges[0].NewMin + ZoomLimit >= xRanges[0].NewMax)
                {
                    cancel = true;
                }
            }

            if (!cancel)
            {
                ZoomXMin = xRanges[0].NewMin;
                ZoomXMax = xRanges[0].NewMax;
            }
        }
If cancel is called once, another zoom can't be performed, because xRanges[0].NewMin and xRanges[0].NewMax aren't updated and have the value of the last performed zoom when it was cancelled.

ArctionTero
Posts: 42
Joined: Thu Mar 28, 2013 9:20 am

Re: BeforeZooming: Ranges not updated after cancel was calle

Post by ArctionTero » Wed Jul 09, 2014 6:07 am

Hi Frank,

Thanks for informing us about the issue, we'll hopefully get it fixed in the next release.

As a workaround you could try to zoom in manually to whole graph (ViewXY.Zoom(x,y,x2,y2)) area and not cancel.
LightningChart Support Team, TK

ArctionTero
Posts: 42
Joined: Thu Mar 28, 2013 9:20 am

Re: BeforeZooming: Ranges not updated after cancel was calle

Post by ArctionTero » Wed Jul 23, 2014 5:55 am

Hi Frank,

Does this still occur with 6.0.9?
LightningChart Support Team, TK

frank
Posts: 51
Joined: Tue Mar 25, 2014 9:04 am

Re: BeforeZooming: Ranges not updated after cancel was calle

Post by frank » Wed Jul 23, 2014 7:05 am

Hi Tero,

this Bug is fixed with Version 6.0.9. Thanks

Post Reply