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

Gantt Chart Scrollbars and datetime

Thread ID:





99328 May 12,2011 08:21 PM UTC May 19,2011 07:17 AM UTC ASP.NET Web Forms (Classic) 3
Tags: Chart
Mark Luptak
Asked On May 12, 2011 08:21 PM UTC

Good Afternoon,

I am working with a grid grouping control and Gantt Chart on a windows form. The user will input task start/end dates through a MonthCalendar control in the GCC and task description in a textbox in the GCC. This information is then placed on the chart.

1) Time is part of the date value. Is there anyway to prevent the chart from reading this(or create date only values), otherwise the Gantt bars do not line up correctly on the grid? (i.e. user picks todays date and it comes out as 5/12/2011 4:00pm, I just need the 5/12/2011).

2)I am unable to get scroll bars working on the chart. There is limited space on the windows form so I would like the Y axis to scroll to allow users to view additional series points. Currently I am able to view 6 points and on the seventh it falls out of the chart area.

I have attached a snapshot of the chart with the above issues present.

Mark Luptak

gantt pic_b603e018.zip

Vijayabharathi K [Syncfusion]
Replied On May 13, 2011 07:38 AM UTC

Hi Mark,

Thanks for using Syncfusion products.

1) Is there anyway to prevent the chart from reading this (or create date only values)? (i.e. user picks todays date and it comes out as 5/12/2011 4:00pm, I just need the 5/12/2011).

We have created a simple sample to display a date value from series points. In this sample, we have used message box to display a date value when clicked on the series point in run time. Please refer the screenshot and sample from below attachment.

Please let us know if we misunderstood your query please provide us some clear details or screenshots about this issue otherwise try to reproducing the issue in the below sample and send us the modified sample, so that we could sort out the cause of the issue and provide you a solution.

2) I would like the Y axis to scroll to allow users to view additional series points?

The scrollbar for axis only enable for zooming feature of chart control. So, we have set value to “ZoomFactor” property of Y-axis to allow user to view the series points by scrollbar. Also, please refer the attachment sample for this query.

Please let us know if have any concern



Mark Luptak
Replied On May 17, 2011 03:32 PM UTC

Hi Vijayabharathi,

Thank you for your reply. The zoom factor successfuly added the scroll bar and I have utilized the messagebox in my code as well, however I would still like the chart to reflect the date correctly. I have attached your sample with my grid grouping control added to it. You can see when you add a task and enter in the start and end dates the chart places those dates based on date and time so the X axis points do not line up (i.e. 5-17-11 falls in between 5-16 and 5-17). If you add hours to the time it will eventually line up on the X axis grids, but I would like to avoid having to add hours to all points that users enter in the grid. Please let me know if this does not make sense.

Thanks again for your help,


Vijayabharathi K [Syncfusion]
Replied On May 19, 2011 07:17 AM UTC

Hi Mark,

Thanks for update the sample.

We suggest you to start the DateTimeRange to axis from 12.00AM to avoid the x-axis line up issue. Please refer the below code snippet to achieve this,

DateTime dt = new DateTime(DateTime.Now.Year, DateTime.Now.Month, DateTime.Now.Day, 00, 00, 00);
this.chartControl1.PrimaryXAxis.DateTimeRange = new ChartDateTimeRange(dt, dt.AddDays(20),2,ChartDateTimeIntervalType.Days);

Please let us know if it helps



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