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: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Set the minimum and maximum date in the datetimeaxis in the code behind

Thread ID:





124262 May 27,2016 09:19 AM UTC Jun 1,2016 07:06 AM UTC WPF 3
Tags: SfChart
Dharani Priyanka Suresh
Asked On May 27, 2016 09:19 AM UTC

In XAML, the following piece of code will help set the minimum and maximum value in the axis.

<syncfusion:DateTimeAxis LabelFormat="dd/MM/yyyy" Minimum="01/01/2016" Maximum="06/06/2016"/>

How do i do the same in the code behind?

Thanks in advance.

Devi Aruna Maharasi Murugan [Syncfusion]
Replied On May 30, 2016 11:11 AM UTC

Hi Dharani, 
Thanks for contacting Syncfusion Support. 
We have converted the date time axis XAML code to C#. Please find the below code example. 
Code Example: 
   DateTimeAxis xAxis=new DateTimeAxis() 
        //Setting the properties for DateTime Axis 
        Minimum=new DateTime(2015,01,01), 
        Maximum=new DateTime(2015,05,01), 
Devi M 

Dharani Priyanka Suresh
Replied On May 31, 2016 05:24 AM UTC

Thank you Devi.

This resolved the problem.

Devi Aruna Maharasi Murugan [Syncfusion]
Replied On June 1, 2016 07:06 AM UTC

Hi Dharani,

Thanks for your updates.

We are glad to know that your requirement has been achieved.

Please contact us, if you need any further assistance.

Devi M


This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon