ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Alan BRASLAU <alan.braslau@cea.fr>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: chart module \connection[cc]
Date: Sun, 11 Nov 2012 21:09:59 +0100	[thread overview]
Message-ID: <20121111210959.0392b042@iram-hb-003386.extra.cea.fr> (raw)

Hello,

Once again, let me say that the chart module is great!

In the following example 3 columns x 2 rows, I connect the cell {3,2}
with the cell {2,1}. In the absence of the cell {2,2}, the arrow nicely
goes through the center of this blank space.

\usemodule [chart]

\setupFLOWcharts [nx=3,ny=2,
                  dx=2\bodyfontsize,dy=2\bodyfontsize,
                  width=7\bodyfontsize,height=7\bodyfontsize,
                  maxwidth=\textwidth]

\starttext

\startFLOWchart [minimal]
    \startFLOWcell
        \name     {11}
        \location {1,1}
        \text     {1,1}
        \connection [rl] {21}
    \stopFLOWcell
    \startFLOWcell
        \name     {21}
        \location {2,1}
        \text     {2,1}
        \connection [rl] {31}
    \stopFLOWcell
    \startFLOWcell
        \name     {31}
        \location {3,1}
        \text     {3,1}
        \connection [bt] {32}
    \stopFLOWcell
%    \startFLOWcell
%        \name     {22}
%        \location {2,2}
%        \text     {2,2}
%    \stopFLOWcell
    \startFLOWcell
        \name     {32}
        \location {3,2}
        \text     {3,2}
        \connection [lb] {21}
    \stopFLOWcell
\stopFLOWchart

\FLOWchart [minimal]

\stoptext


Question (or perhaps feature request),
it would be nice to be able to connect the cells {3,2} and {2,1}
using a diagonal arrow, running directly from the center of one cell
to the center of the other, of course ending at the intersections
with the cell shapes outlines. Is this possible?

A decent syntax could be
        \connection [cc] {21}

This syntax could also nicely work for the other connections,
without having to specify "l" or "r" or "t" or "b".
Thus,
        \connection [rl] {21}
for the cell {1,1} could be replaced by
        \connection [cc] {21}
yielding the same result.

I can figure out how to do this in metapost, but I have not
looked into the chart module code.

Alan
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


                 reply	other threads:[~2012-11-11 20:09 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20121111210959.0392b042@iram-hb-003386.extra.cea.fr \
    --to=alan.braslau@cea.fr \
    --cc=ntg-context@ntg.nl \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).