How to get actual value of ActualInterval with EnableAutoIntervalOnZooming

Hi,

I'm using SfChart axis with EnableAutoIntervalOnZooming set to true, and I'd like to get actual interval value and type after zoom. Currently, I'm reading ActualIntervalType and ActualInterval  properties of the primary axis, but the problem is, that ActualInterval doesn't reflect new automatic itervals when in zooming. ActualIntervalType seems to react - axis is DateTime type, and I can see changes eg. from Seconds to Milliseconds of this property while zooming, but ActualInterval value keeps constant. I've tried ActualRangeChanged event and it's ActualInterval value also, but without success.

Kind regards

Wojciech

3 Replies

MK Muneesh Kumar G Syncfusion Team October 16, 2018 11:50 AM UTC

Hi Wojciech, 
 
Thanks for using Syncfusion products.  
 
We have analyzed your requirement and we would like to inform you that ActualInterval property that holds the value is that calculated in non-zooming state only. You can get the zooming state interval value by accessing VisibleInterval property in axis as per the below code snippet.  
 
Code snippet [C#]: 
private void DateTimeAxis_ActualRangeChanged(object sender, ActualRangeChangedEventArgs e) 
        { 
            var visibleInterval = sender.GetType().GetProperty("VisibleInterval", 
                System.Reflection.BindingFlags.NonPublic | System.Reflection.BindingFlags.Instance).GetValue(sender); 
        } 
  
We have prepared a sample based on that, please find the sample from the following location.  
 
 
Hope it helps.   
  
Regards, 
Muneesh Kumar G. 



WO Wojciech October 16, 2018 12:30 PM UTC

Hi

Thanks for the quick help, that's the property I was searching for.

Regards 

Wojciech


MK Muneesh Kumar G Syncfusion Team October 16, 2018 01:04 PM UTC

Hi Wojciech,

Thanks for the update.

We are glad to know that the given solution works. Please let us know if you need any further assistance.

Regards,
Muneesh Kumar G.
 


Loader.
Up arrow icon