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
close icon

Gantt Chart Look

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

1 Reply

MG Mohanraj Gunasekaran Syncfusion Team August 11, 2017 01:45 PM UTC

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 


Loader.
Live Chat Icon For mobile
Up arrow icon