IArrowSeries.AddArrow
IArrowSeries

function AddArrow(X0, Y0, X1, Y1: Double; Const ALabel: WideString; Value: OLE_COLOR): Integer;

Type Library
TeeChartx

Description
The AddArrow function adds a new arrow point to the Series. Returns the position of the Arrow in the list. Positions start at zero.

Each arrow is made of 2 points:

(X0,Y0) The starting arrow point.

(X1,Y1) The arrow head end point.

AddArrow Example

This code fills an ArrowSeries with two random arrows:

Delphi

var

x0,y0,x1,y1 : Double;

begin

With TChart1.Series[ 0 ] do

begin

asArrow.StartXValues.DateTime:=False;

asArrow.EndXValues.DateTime:=False;

Clear;

x0 :=Random( 1000 );

y0 :=Random( 1000 );

x1 :=x0 + Random( 1000 ) - 500 ;

y1 :=y0 + Random( 1000 ) - 500 ;

asArrow.AddArrow(x0,y0,x1,y1,'',clBlue);

x0 :=Random( 1000 );

y0 :=Random( 1000 );

x1 :=x0 + Random( 1000 ) - 500 ;

y1 :=y0 + Random( 1000 ) - 500 ;

asArrow.AddArrow( x0, y0, x1, y1, '', clYellow);

end;

end;

Visual Basic

Dim x0, y0, x1, y1 As Double

With TChart1.Series( 0 )

.asArrow.StartXValues.DateTime = False

.asArrow.EndXValues.DateTime = False

.Clear

x0 = (1000 * Rnd(10))

y0 = (1000 * Rnd(10))

x1 = x0 + Rnd(1000) - 100

y1 = y0 + Rnd(1000) - 100

.asArrow.AddArrow x0, y0, x1, y1, "", vbBlue

x0 = (1000 * Rnd(10))

y0 = (1000 * Rnd(10))

x1 = x0 + (500 * Rnd(5)) - 50

y1 = y0 + (500 * Rnd(5)) - 50

.asArrow.AddArrow x0, y0, x1, y1, "", vbYellow

End With