Get axis interval after zoom

Dear Syncfusion Team,

is there a way to get the final axis range after zooming?

I tried using the OnZoomEnd event but the axis min- and max-values passed to the event seem to be the ones before the zoom starts.


Or maybe you have another suggestion for my szenario: My backend does some downsampling on the data since the number of samples is not defined (looking at month scale for example). The user zooms in to day scale and I want to refresh the data only for the visible day in more detail (replace the downsampled month data with higher sampled day data).


Any suggestions?

Thanks

Michael


3 Replies

DG Durga Gopalakrishnan Syncfusion Team February 6, 2022 03:17 PM UTC

Hi Michael, 

Greetings from Syncfusion. 

We request you to use OnAxisActualRangeCalculated event to get axis minimum, maximum and interval for each axis. Please check with the below snippet and UG link. 

<SfChart> 
    <ChartEvents OnAxisActualRangeCalculated="RangeCalculated"></ChartEvents> 
</SfChart> 
@code{ 
    public void RangeCalculated(AxisRangeCalculatedEventArgs Args) 
    { 
        var maximum = Args.Maximum; 
        var minimum = Args.Minimum; 
        var interval = Args.Interval; 
    } 
} 


Kindly revert us if you have any concerns. 

Regards, 
Durga G 



MS Michael Schneider February 18, 2022 11:44 AM UTC

Works as required. Thanks!



DG Durga Gopalakrishnan Syncfusion Team February 21, 2022 05:47 AM UTC

Hi Michael, 

Most welcome. Please get back to us if you need any further assistance. We are always happy in assisting you. 

Regards, 
Durga G. 


Loader.
Up arrow icon