%&cont-en

\usemodule[chart]

\setuppapersize[S6][S6]

\newif\ifpdf
\pdftrue
\ifx\pdfoutput\relax
    \pdffalse
\else
    \ifnum\pdfoutput=0
        \pdffalse
    \fi
\fi

\ifpdf
  \setupinteractionscreen[option=max]
  \setupbackgrounds[paper][text]
                   [background=color,backgroundcolor=darkyellow]
\fi


\setuppagenumbering[state=stop]

\starttext

\setupFLOWcharts[maxwidth=\textwidth,dx=\bodyfontsize,dy=\bodyfontsize]
\setupFLOWshapes[default=procedure]
\setupFLOWlines[radius=\bodyfontsize,arrow=no]

\startFLOWchart[gbchart]
    \startFLOWcell
       \name {boxone}
       \text {Box 1}
       \location {3,3}
       \connection[-bt]{boxc}
       \connection[+bt]{boxnull}
       \connection[tl]{boxb}
   \stopFLOWcell

   \startFLOWcell
       \name {boxtwo}
       \text {Box 2\\More text}
       \location {1,3}
       \connection[bt]{boxc}
   \stopFLOWcell

   \startFLOWcell
       \name {boxc}
       \text {Box c\\Even more\\Text}
       \location {2,4}
   \stopFLOWcell

   \startFLOWcell
       \name {boxthree}
       \text {Box 3\\More text}
       \location {5,3}
       \connection[bt]{boxnull}
   \stopFLOWcell

   \startFLOWcell
       \name{boxnull}
       \shape{0}
       \location {4,4}
       \connection[bt]{boxa}
       \connection[bt]{boxd}
   \stopFLOWcell
   
   \startFLOWcell
       \name {boxa}
       \text {Box a\\Even more\\Text}
       \location {5,5}
   \stopFLOWcell

   \startFLOWcell
       \name {boxd}
       \text {Box d\\Even more\\Text}
       \location {3,5}
   \stopFLOWcell

   \startFLOWcell
       \name {boxfour}
       \text {Box 4\\More text}
       \location {3,1}
       \connection[bl]{boxb}
   \stopFLOWcell

   \startFLOWcell
       \name {boxb}
       \text {Box b\\Even more\\Text}
       \location {4,2}
   \stopFLOWcell

\stopFLOWchart

\FLOWchart[gbchart]

\stoptext
