Graphics and media/Drawing graphs and diagrams/Flow charts

Unofficial ConTeXt Wiki mirror

Last modified: 2025-01-18

Context provides a charts module to create flow charts. The details are in the Charts uncovered manual by Pragma.

For example

The more sophisticated example:

Changing the appearance of cells (background color, rule thickness)

It is possible to have each cell with its own color and its own rule thickness. For example

As a matter of fact, there is no need for "background=color" because each cell already has a background color by default.

Syntax for \connection

\connection [<from><to>] {<FLOWcell>}

<from> and <to> are the points from which point to which point the connection should be drawn. The following graphic depicts the names of the points.

       -t    t    +t
     ---------------- 
 +l |                | +r
    |                |
  l |                |  r
    |                |
 -l |                | -r
    |                |
     ---------------- 
       -b    b    +b

Example

The following code draws a line from the left top point of the current cell to the right bottom point of cell foobar.

\connection [-t+b] {foobar}

The code for connections in the pdf manual, e.g.

\connection[nb,pt]{episode_02_title}

No longer works

Aligning text within the cell

To align left or right, use

\text[l]{left}
\text[r]{right}

Forcing a paragraph break with \par in a cell does not work...

\text[l]{firstline \par secondline}

Whereas using \\ does work, so:

\text[l]{firstline \\ secondline}

Further hints