Articles in this section
Category / Section

How to use connection lines in the Gantt Chart?

1 min read

 

A Gantt chart is a graphical representation of the duration of tasks against the progression of time. This chart is excellent for planning the use of resources, and data can be plotted using a date-time scale or a numerical scale.

We have the direct support to connect the Gantt chart points using the property "RelatedPoints" and various customizing options are also available. Here is the sample code to do this.

C#

//Indicates the connection lines between the points

int[] ptIndices1 = new int[] { 1 };

this.ChartWebControl1.Series[1].Styles[5].RelatedPoints.Points = ptIndices1;

//Customizing options for the lines.

this.ChartWebControl1.Series[1].Styles[5].RelatedPoints.Color = Color.Red;

this.ChartWebControl1.Series[1].Styles[5].RelatedPoints.Alignment = System.Drawing.Drawing2D.PenAlignment.Center;

this.ChartWebControl1.Series[1].Styles[5].RelatedPoints.DashStyle = System.Drawing.Drawing2D.DashStyle.Solid;

this.ChartWebControl1.Series[1].Styles[5].RelatedPoints.Width = 2f;

Below is the sample link demonstrating the connection lines in Gantt chart

Gantt Chart with Connection lines

Did you find this information helpful?
Yes
No
Help us improve this page
Please provide feedback or comments
Comments (0)
Please sign in to leave a comment
Access denied
Access denied