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

Set X Intreval in Charts

Hello

As I am new to sync fusion, I am exploring your chart controls, while exploring I found that I am not able to set X Axis interval for chart. Let me describe whole scenario

My Chart renders on some specific conditions and data is coming from database. In that case I have gave the options in user interface to configure the chart, from which user can customize the chart as per his/her requirements. Now if I have some values from database which are in time (e.g. : 7:00 AM,8:00 AM,9:00 AM,10:00 AM)  and to be shown on X Axis and I have gave the interval to 2 but my chart is taking 1 as  X axis interval automatically.  As per my understanding X axis points should be 8:00 AM and 10:00 AM  but points are 8:00 AM, 9:00 AM, 10:00 AM. 

Why so when I have defined the interval for chart.

Please help me out for this ASAP. Your soonest response will be appreciable.

Thanks.

1 Reply

DP Deepaa Pragaasam Syncfusion Team October 5, 2015 09:17 AM UTC

Hi Ranjeeth,
Thanks for contacting Syncfusion Support.
We have analyised your query. We are not able to reproduce the issue at our end.
We have created a sample using DateTime Axis.
DataSource is used for passing the data and interval type is set as hours with the interval value of 2.
Please refer the screenshot for the output

Code snippet:
[ASP.NET]
  <PrimaryXAxis ValueType="Datetime"  LabelFormat="HH:MM tt" IntervalType="Hours" Title-Text="Sales Across Years" />
[ASP.NET.cs]

  this.Chart1.PrimaryXAxis.Range.Min = new DateTime(2000, 6, 1);

           this.Chart1.PrimaryXAxis.Range.Max = new DateTime(2000, 6, 2);

  //Setting Range  interval for PrimaryXAxis
            this.Chart1.PrimaryXAxis.Range.Interval = 2;

The help document link for using the DateTime Axis is given below.
http://help.syncfusion.com/aspnet/chart/axis#datetime-axis

I have attached the sample for your reference
 http://www.syncfusion.com/downloads/support/forum/120692/ze/Webapplication-823805666
If you still face the issue, kindly revert back us by modifying the attached sample along with replication procedure.

This will be helpful for us to find and fix the issue sooner.

Please let us know if you have any concerns.
Regards,
Deepaa.


Loader.
Up arrow icon