PyChart Reference Manual

Node:arrow, Next:Tricks, Previous:text_box, Up:Top

## Arrows

Arrow is an optional component of a chart that draws line segments with an arrowhead. To draw an arrow, one creates an arrow.T object, and calls its "draw" method usually after area.draw() is called (otherwise, area.draw() may overwrite the arrow). For example, the below code draws an arrow from (10,10) to (20,30).

    ar = area.T(...)
    a = arrow.T(head_style = 1)
    ar.draw()
    a.draw([(10,10), (20,30)])

XXX %%arrow.T

head_color <class 'pychart.color.T'> | Attribute

Default: color.black. The color of the arrow head.

head_len number | Attribute

Default: 8. The length of the arrow head.

head_style int | Attribute

Default: 1. The value of 0 draws a triangular arrow head. 1 draws a swallow-tail arrow head

line_style <class 'pychart.line_style.T'> | Attribute

Default: line_style.black. Line style.

thickness number | Attribute

Default: 4. The width of the arrow head.

An arrow object exports a single public method, `draw`.

draw SELF POINTS | Method

Points: The list of points the arrow traverses. It should contain at least two points, ie the tail and tip.