Graph-Easy-Manual

 view release on metacpan or  search on metacpan

doc/manual/syntax.html  view on Meta::CPAN

node.city { background: red; }	# for all nodes with class "city"

[ Bonn ] { class: city; }	# for the node "Bonn"

[ Bonn ] --> { style: dotted; }	# for the edge "Bonn" to "Berlin"
[ Berlin ] { color: green; }	# for the node "Berlin"

[ ABC ] { border: bold; color: white; }

[ DEF ] 			# DEF has not yet attributes
  {
  fill: #ff8060;		# applies only to DEF
  } ,
[ GHI ]
  {				# these apply to DEF and GHI!
    border: bold; 
    color: white; 
  } ,
[ JKL ]
  {
    shape: circle;		# applies to DEF, GHI and JKL
  }

[ ] { fill: brown; }		# for the anonymous node only
</pre>

<h4>Multiple Attributes</h4>

<p>
As a special case for autosplit nodes, you can separate attribute values
with "|" (vertical bar) for each part of the auto-split node:
</p>

<pre>
[ Bonn | Berlin | Frankfurt ] { fill: red|yellow|blue; }
</pre>

<p>
In the example above, "Bonn" would be red, "Berlin" yellow and "Frankfurt" blue.
Missing values will <b>NOT</b> change the attribute on the node as in the following
example, where "Berlin" and "Ulm" will get the default background (white):
<p>

<pre>
node { fill: white; }

[ Bonn | Berlin | Hahn | Ulm ] { fill: red||blue; }
</pre>

<p>
The <code>||</code> here means that the attribute value is missing, please do
not confuse that with <code>||</code> inside the autosplit node itself,
where this introduces a "linebreak".
</p>

<p>
You can also set an attribute for all parts, or only for specific parts:
</p>

<ul>
  <li><code>[ A|B ] { class: |legend; }</code>
      will put B into class 'legend' and leave the class of A alone
  <li><code>[ A|B ] { class: legend|; }</code>
      will put A into class 'legend' and leave the class of B alone
  <li><code>[ A|B ] { class: legend; }</code>
      will put A <b>and</b> B into class 'legend'
</ul>

<p>
Here are the rules from above in an example showing their effect:
</p>

<pre class="graphtext">
node.1 { border: dotted; }
node.2 { border: dashed; }
node.3 { border: dot-dash; }
node { border: double; }

[ AAAA|BBBB ] { class: |1; }
[ CCCC|DDDD ] { class: 2|; }
[ EEEE|FFFF ] { class: 3; }
</pre>

<pre class="graph">
#======#.......
H AAAA H BBBB :
#======#......:
+ - - -+======#
' CCCC ' DDDD H
+ - - -+======#
+-.-.-.+.-.-.-+
! EEEE ! FFFF !
+-.-.-.+.-.-.-+
</pre>

<p class="clear">
For a complete listing of possible attributes see the appropriate
<a href="attributes.html">chapter</a>.
</p>

<a name="edges">
<h4>Edges</h4>
</a>

<p>
The edges between the nodes can have the following styles:
</p>

<pre>
        ->              solid
        =>              double
        .>              dotted
        ~>              wave

        - >             dashed
        .->             dot-dash
        ..->            dot-dot-dash
        = >             double-dash
</pre>

<p>
In addition to these, the following styles exist:
</p>

<ul>
  <li><code>bold</code>



( run in 1.023 second using v1.01-cache-2.11-cpan-39bf76dae61 )