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. Image for the cookie policy date

DateTimeAxis zoom-in quarter steps

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:


3 Replies

BK Bharathiraja K Syncfusion Team June 12, 2019 06:35 AM

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. 



PA Pablo June 12, 2019 07:42 AM

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: