ZoomedOut, BeforeZoomingOut Events

Need a new feature to LightningChart Ultimate? Post it here and perhaps it will be implemented in the next version...

Moderator: Arction_LasseP

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

ZoomedOut, BeforeZoomingOut Events

Post by frank » Fri May 09, 2014 11:46 am

Hi,

in LC6 exist Zoomed and BeforeZooming events. It would be handy, if we could also get events for zooming out.

User avatar
ArctionPasi
Posts: 1366
Joined: Tue Mar 26, 2013 10:57 pm
Location: Finland

Re: ZoomedOut, BeforeZoomingOut Events

Post by ArctionPasi » Mon May 12, 2014 2:53 pm

Hi Frank,

these events also fire in zooming out with mouse buttons.

For example, this code shows how to investigate is it zooming in our out.

Code: Select all

void ViewXY_Zoomed(List<RangeChangeInfo> xRanges, List<RangeChangeInfo> yRanges)
        {
            if((xRanges[0].NewMax - xRanges[0].NewMin) >  (xRanges[0].OldMax - xRanges[0].OldMin))
                System.Diagnostics.Debug.WriteLine("zoomed out"); 
            else
                System.Diagnostics.Debug.WriteLine("zoomed in"); 
        }
LightningChart Support Team, PT

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

Re: ZoomedOut, BeforeZoomingOut Events

Post by frank » Mon May 12, 2014 3:01 pm

Thanks,

this tip is very helpful.

Best regards,
Frank

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

Re: ZoomedOut, BeforeZoomingOut Events

Post by frank » Tue May 13, 2014 6:05 am

Hi,

I just tried to implement your example. But in WPF I only have

Code: Select all

xRanges[0].CurrentMin
xRanges[0].CurrentMax

User avatar
ArctionPasi
Posts: 1366
Joined: Tue Mar 26, 2013 10:57 pm
Location: Finland

Re: ZoomedOut, BeforeZoomingOut Events

Post by ArctionPasi » Mon May 19, 2014 11:51 am

As discussed by e-mail, BeforeZooming has only Current values because zooming has not finished yet, and thus end range is not known. In Zoomed event Old and New range are available.
LightningChart Support Team, PT