IGanttSeries
Hierarchy Properties Methods

Type Library
TeeChartx

Description
Follow this link for a visual representation of this Series type.

The GanttSeries outputs all points as horizontal bars with different starting and ending horizontal coordinates and different vertical positions. GanttSeries uses IPointer (PointSeries subclass) points when painting Gantt boxes.

It can be used to display a sequence of temporal tasks, sorted over time along the horizontal axis.

Set the ParentChart property to the desired Chart class. Use the AddGantt or AddGanttColor methods to manually fill gantt bar points.

Each gantt bar has an start and end values. These values can be DateTime or Double types.

The StartValues property stores all starting values for all Gantt bars. The EndValues property stores all ending values for all Gantt bars.

You can connect gantt bars by using the NextTask property.

Example:

Visual Basic

With TChart1

.AddSeries scGantt

'Clear all Series Gantt bars

.Series(0).Clear

'Add a first Gantt bar

tmp1 = .Series(0).asGantt.AddGantt(DateValue("1/1/1996"), DateValue("31/1/1996"), 0, "Programming")

'Add a second Gantt bar

tmp2 = .Series(0).asGantt.AddGantt(DateValue("1/3/1996"), DateValue("31/3/1996"), 1, "Testing")

'Connect the first bar to the second bar

.Series(0).asGantt.NextTask.Value(tmp1) = tmp2

End With

Delphi

Var tmp1,tmp2 : Integer;

{ Clear all Series Gantt bars }

TChart1.Series( 0 ).Clear;

{ Add a first Gantt bar }

tmp1 := TChart1.Series( 0 ).asGantt.AddGantt( EncodeDate( 1996, 1,1 ),

EncodeDate( 1996, 1,31 ),

0,

'Programming' );

{ Add a second Gantt bar }

tmp2 := TChart1.Series( 0 ).asGantt.AddGantt( EncodeDate( 1996, 3,1 ),

EncodeDate( 1996, 3,31 ),

1,

'Testing' );

{ Connect the first bar to the second bar }

TChart1.Series( 0 ).asGantt.NextTask[ tmp1 ]:= tmp2 ;

The ConnectingLinePen property determines the pen used to draw the connecting lines between gantt bar points.

The Pointer.VerticalSize property specifies the gantt bars height.

Please refer to PointSeries ancestor description for all common Series properties like Pointer, Marks, Axis dependence, methods and events.