We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: June 24, 2019).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

DateTimeAxis zoom-in quarter steps

Thread ID:

Created:

Updated:

Platform:

Replies:

145203 Jun 12,2019 09:04 AM UTC Jun 13,2019 11:05 AM UTC Xamarin.Forms 3
loading
Tags: SfChart
Pablo
Asked On June 12, 2019 09:04 AM UTC

I have a chart with X=DateTimeAxis, Y=NumericAxis and an 4 items per hour from 00:00 to 23:45. 
When I zoom in the data I'd like to see quarter steps (15 minutes) instead of "automatic 20 minutes steps". 
Is there any way to configure that?
Thanks!!

Normal view:


Zoomed in:


Bharathiraja K [Syncfusion]
Replied On June 12, 2019 11:35 AM UTC

Hi Pablo, 
 
Greetings from Syncfusion. EnableAutoIntervalOnZooming properties determines the update of the axis intervals, based on visible range while zooming. By setting EnableAutoIntervalOnZooming as false and set interval as 15 means, we can achieve your requirement. If it is true, we will calculate auto interval in source. Please refer the below code snippet. 
 
[XAML]: 
<chart:SfChart.PrimaryAxis> 
                        <chart:DateTimeAxis EnableAutoIntervalOnZooming="False" IntervalType="Minutes" Interval="15" Minimum="{Binding Minimum}" Maximum="{Binding Maximum}" > 
   <chart:DateTimeAxis.LabelStyle > 
                                <chart:ChartAxisLabelStyle TextColor="White" LabelFormat="hh mm" > 
                                </chart:ChartAxisLabelStyle> 
                            </chart:DateTimeAxis.LabelStyle> 
                        </chart:DateTimeAxis> 
                    </chart:SfChart.PrimaryAxis> 
 
 
Hope the above information will helpful to you.  
 
Regards, 
Bharathi. 


Pablo
Replied On June 12, 2019 12:42 PM UTC

Thanks for the quick reply. With that suggestion we fix the zoom-in view, but the normal view gets worse. 
Is there a way to mix/modify/adapt both configurations? (hours-2 in normal view and minutes-15 if zoom-in)

Normal view:


Zoom-in view: