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

Gantt Chart Look

Thread ID:

Created:

Updated:

Platform:

Replies:

132061 Aug 10,2017 09:25 AM Aug 11,2017 09:45 AM Windows Forms 1
loading
Tags: GridGroupingControl
Tim Luna
Asked On August 10, 2017 09:25 AM

Hello, Is there any way to achieve a look similar to the JS Gantt chart that I have attached with Windows Forms?

I have already tried to make something similar with a combination of the GridGroupingControl and the Chart control but my results were pretty bad. 

Thanks!

Attachment: JSsample_38f8daca.7z

Mohanraj Gunasekaran [Syncfusion]
Replied On August 11, 2017 09:45 AM

Hi Tim, 
 
Thanks for contacting Syncfusion support.   
 
As of now the features which are all available in Javascript Gantt chart cannot be achieved with the Gantt chart in windows forms. In windows forms Gantt chart, to the data source(points) you need to pass three arguments viz (x, start and end). These start and end values can be in double or in date time. If it is in date time, then you need to specify the value type of the axis to DateTime. Since by default the axis will render in double. We have prepared a simple sample for depicting this behavior. Find the code snippet below to achieve this requirement.  
 
ChartSeries series = new ChartSeries("series1", ChartSeriesType.Gantt); 
for (int i = 0; i < dTable.Rows.Count; i++) 
{ 
    series.Points.Add(i, Convert.ToDateTime(dTable.Rows[i]["StartDate"]), Convert.ToDateTime(dTable.Rows[i]["EndDate"])); 
} 
 
this.chart.Series.Add(series); 
this.chart.PrimaryXAxis.ValueType = ChartValueType.DateTime; 

Sample link: GridwithGantt 

Regards, 
Mohanraj G 


CONFIRMATION

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.

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

;