Graph::Easy - Manual

Attributes

If you haven't done so, please read the Overview first.

This chapter describes all the possible attributes for nodes.
It is generated automatically from the definitions in Graph::Easy::Attributes.

Nodes

align

The alignment of the label text. One of: center, left, right.
Defaults to: center for graph and nodes, left for groups and edge labels
Example graph:

graph { align: left; label: My Graph; }
node {align: left;}
 ( Nodes:
 [ Right\nAligned ] { align: right; } -- label\n text -->
 { align: left; }
 [ Left\naligned ] )
My Graph
  Nodes:    
  Right
Aligned
  label
text
>   Left
aligned
 
   
     

autolabel

Will automatically generate the label, unless label is already set. The label will be restricted to N characters length, where N should be greater than 12. This attribute is inherited by nodes, edges and groups. See the section about labels, titles, names and links for reference.
Defaults to:
Example graph:

graph { autolabel: name,20; autotitle: name; }

[ Bonn ] -- Acme Travels Incorporated --> [ Frankfurt (Main) / Flughafen ]
Bonn Acme Tr ... porated > Frankfu ... ughafen
   

autolink

If set to something else than 'none', will use the appropriate attribute to automatically generate the link, unless link is already set. This attribute is inherited by nodes, edges and groups. See the section about labels, titles, names and links for reference. One of: label, title, name, none.
Defaults to: none
Example value: title

autotitle

If set to something else than 'none', will use the appropriate attribute to automatically generate the title, unless title is already set. This attribute is inherited by nodes, edges and groups. See the section about labels, titles, names and links for reference. One of: label, name, none, link.
Defaults to: none
Example value: label

background

The background color, e.g. the color outside the shape. Do not confuse with fill. See the section about color names and values for reference.
Defaults to: "white" for the graph, "inherit" for edges, and undef and nodes
Example graph:

[ Crimson ] { shape: circle; background: crimson; }
 -- Aqua Marine --> { background: #7fffd4; }
 [ Misty Rose ] { background: white; fill: rgb(255,228,221); }
Crimson Aqua Marine > Misty Rose
   

basename

Controls the base name of an autosplit node. Ignored for all other nodes.
Defaults to: automatically generated from the parts
Example graph:

[ A|B|C ] { basename: A } [ 1 ] -> [ A.2 ]
 [ A|B|C ] [ 2 ] -> [ ABC.2 ]
1
   
  v
A B C
2
   
  v
A B C

border

The border. Can be any combination of border-style, border-color and border-width.
Defaults to: 1px solid black
Example graph:

[ Normal ]
 --> [ Bold ]      { border: bold; }
 --> [ Broad ]     { border: broad; }
 --> [ Wide ]      { border: wide; }
 --> [ Bold-Dash ] { border: bold-dash; }
Normal   > Bold   > Broad   > Wide   > Bold-Dash
   

border-color

The color of the border. See the section about color names and values for reference.
Defaults to: black
Example graph:

node { border: black bold; }
[ Black ]
 --> [ Red ]      { border-color: red; }
 --> [ Green ]    { border-color: green; }
Black   > Red   > Green
   

border-style

The style of the border. The special styles "bold", "broad", "wide", "double-dash" and "bold-dash" will set and override the border-width. One of: none, solid, dotted, dashed, dot-dash, dot-dot-dash, double, wave, bold, bold-dash, broad, double-dash, wide.
Defaults to: "none" for graphs and edges, "solid" for nodes and "dotted" for groups.
Example graph:

node { border: dotted; }
[ Dotted ]
 --> [ Dashed ]      { border-style: dashed; }
 --> [ broad ]    { border-style: broad; }
Dotted   > Dashed   > broad
   

border-width

The width of the border. Certain border-styles will override the width.
Defaults to: 1px
Example value: 2px

class

The subclass. See the section about class names for reference.
Defaults to:
Example value: mynodeclass

color

The foreground/text color. See the section about color names and values for reference.
Defaults to: black
Example graph:

[ Crimson ] { color: crimson; }
 -> { color: blue; }
 [ Dark Orange ] { color: rgb(255,50%,0.01); }
Crimson   > Dark Orange
   

colorscheme

The color scheme to use for all color values. Defaults to 'inherit' for nodes, edges and groups, and 'w3c' for the graph. See the section about color names and values for reference and a list of possible values.
Defaults to: inherit
Example graph:

graph { colorscheme: accent8; } [ 1 ] { fill: 1; }
 -> 
 [ 3 ] { fill: 3; }
 -> 
 [ 4 ] { fill: 4; }
 -> 
 [ 5 ] { fill: 5; }
 -> 
 [ 6 ] { fill: 6; }
 -> 
 [ 7 ] { fill: 7; }
 -> 
 [ 8 ] { fill: 8; }

1   > 3   > 4   > 5   > 6   > 7   > 8
   

columns

The size of the node in columns. See also size.
Defaults to: 1
Example value: 2

fill

The fill color, e.g. the color inside the shape. For the graph, this is the background color for the label. For edges, the color inside the arrow shape. See also background. See the section about color names and values for reference.
Defaults to: "white" for the graph and nodes, "inherit" for edges
Example graph:

[ Crimson ]
  {
  shape: octagon;
  background: crimson;
  fill: red;
  border-color: slategrey;
  }
-- Aqua Marine -->
  {
  arrow-style: filled;
  fill: red;
  }
[ Two ]
Crimson Aqua Marine Two
   

flow

The general direction in which edges will leave this node first. Please see the section about flow control for reference.
Defaults to: east
Example graph:

graph { flow: up; }
 [ Enschede ] { flow: left; } -> [ Bielefeld ] -> [ Wolfsburg ]
Enschede
   
  v
Bielefeld   > Wolfsburg
   

font

A prioritized list of lower-case, unquoted values, separated by a comma. Values are either font family names (like "times", "arial" etc) or generic family names (like "serif", "cursive", "monospace"), the first recognized value will be used. Always offer a generic name as the last possibility.
Defaults to: "sans-serif" for edge labels, and "serif" for all other labels
Example graph:

graph { font: vinque, georgia, utopia, serif; label: Sample; }

 ( Nodes:
 [ Webdings ] { font: Dingbats, webdings; }
 -- FlatLine -->
 { font: flatline; }
  [ Normal ] )
Sample
  Nodes:    
  Webdings   FlatLine >   Normal  
   
     

font-size

The size of the label text, best expressed in em (1.0em, 0.5em etc) or percent (100%, 50% etc)
Defaults to: "1.0em" for the graph and nodes, "0.8em" for edge and group labels
Example graph:

graph { font-size: 200%; label: Sample; }

 ( Nodes:
 [ Big ] { font-size: 1.5em; color: white; fill: darkred; }
  -- Small -->
 { font-size: 0.2em; }
  [ Normal ] )
Sample
  Nodes:    
  Big   Small >   Normal  
   
     

format

The formatting language of the label. The default, none means nothing special will be done. When set to pod, formatting codes like B<bold> will change the formatting of the label. See the section about label text formatting for reference. One of: none, pod.
Defaults to: none
Example graph:

graph {
  format: pod;
  label: I am B<bold> and I<italic>;
  }
node { format: pod; }
edge { format: pod; }

[ U<B<bold and underlined>> ]
--> { label: "S<Fähre>"; }
 [ O<Konstanz> ]

I am bold and italic
U<bold and underlined> Fähre > Konstanz
   

group

Puts the node into this group.
Defaults to:
Example graph:

[ A ] { group: Cities:; } ( Cities: [ B ] ) [ A ] --> [ B ]
  Cities:    
  A     >   B  
   
     

id

A unique identifier for this object, consisting only of letters, digits, or underscores.
Defaults to:
Example graph:

[ Bonn ] --> { id: 123; } [ Berlin ]
Bonn   > Berlin
   

label

The text displayed as label. If not set, equals the name (for nodes) or no label (for edges, groups and the graph itself).
Defaults to:
Example value: My label

link

The link part, appended onto linkbase. See the section about links for reference.
Defaults to:
Example graph:

node {
  autolink: name;
  text-style: none;
  font-size: 1.1em;
  }
graph {
  linkbase: http://de.wikipedia.org/wiki/;
  }
edge {
  text-style: overline;
  }

[] --> [ Friedrichshafen ]
 -- Schiff --> { autolink: label; color: orange; title: Vrooom!; }
[ Immenstaad ] { color: green; } --> [ Hagnau ]

  > Friedrichshafen Schiff > Immenstaad   > Hagnau
   

linkbase

The base URL prepended to all generated links. This attribute is inherited by nodes, edges and groups. See the section about links for reference.
Defaults to:
Example value: http://en.wikipedia.org/wiki/

offset

The offset of this node from the origin node, in columns and rows. Only used if you also set the origin node.
Defaults to: 0,0
Example graph:

[ A ] -> [ B ] { origin: A; offset: 2,2; }
A    
   
   
  v
B

origin

The name of the node, that this node is relativ to. See also offset.
Defaults to:
Example value: Cluster A

point-style

Controls the style of a node that has a shape of 'point'. One of: circle, cross, diamond, dot, invisible, square, star.
Defaults to: star
Example graph:

node { shape: point; }

 [ A ]
 -> [ B ] { point-style: circle; }
 -> [ C ] { point-style: cross; }
 -> [ D ] { point-style: diamond; }
 -> [ E ] { point-style: dot; }
 -> [ F ] { point-style: invisible; }
 -> [ G ] { point-style: square; }
 -> [ H ] { point-style: star; }
  >   > +   >   > ·   >   >   >
   

rank

The rank of the node, used by the layouter to find the order and placement of nodes. Set to auto (the default), same (usefull for node lists) or a positive number. See the section about node ranks for reference and more examples.
Defaults to: auto
Example graph:

[ Bonn ], [ Berlin ] { rank: same; }
 [ Bonn ] -> [ Cottbus ] -> [ Berlin ]
Bonn   > Cottbus   > Berlin
   

rotate

The rotation of the node shape, either an absolute value (like south, up, down or 123), or a relative value (like +12, -90, left, right). For relative angles, the rotation will be based on the node's flow. Rotation is clockwise.
Defaults to: 0
Example graph:

[ Bonn ] { rotate: 45; } -- ICE --> 
 [ Berlin ] { shape: triangle; rotate: -90; }
Bonn ICE > Berlin
   

rows

The size of the node in rows. See also size.
Defaults to: 1
Example value: 3

shape

The shape of the node. Nodes with shape 'point' (see point-style) have a fixed size and do not display their label. The border of such a node is the outline of the point-shape, and the fill is the inside of the point-shape. When the shape is set to the value 'img', the label will be interpreted as an external image resource to display. In this case attributes like color, font-size etc. are ignored. One of: circle, diamond, edge, ellipse, hexagon, house, invisible, invhouse, invtrapezium, invtriangle, octagon, parallelogram, pentagon, point, triangle, trapezium, septagon, rect, rounded, none, img.
Defaults to: rect
Example graph:

[ Bonn ] -> 
 [ Berlin ] { shape: circle; }
 -> [ Regensburg ] { shape: rounded; }
 -> [ Ulm ] { shape: point; }
 -> [ Wasserburg ] { shape: invisible; }
 -> [ Augsburg ] { shape: triangle; }
 -> [ House ] { shape: img; label: img/house.png;
          border: none; title: My House; fill: inherit; }
Bonn   > Berlin   > Regensburg   >   >   > Augsburg   > My House
   

size

The size of the node in columns and rows. Must be greater than 1 in each direction.
Defaults to: 1,1
Example value: 3,2

text-style

The style of the label text. Either 'none', or any combination (separated with spaces) of 'underline', 'overline', 'bold', 'italic', 'line-through'. 'none' disables underlines on links.
Defaults to: none
Example graph:

graph {
  font-size: 150%;
  label: Verbindung;
  text-style: bold italic;
  }
node {
  text-style: underline bold;
  fill: #ffd080;
  }
edge {
  text-style: italic bold overline;
  }

[ Meersburg ] { font-size: 2em; }
 -- Fähre --> { font-size: 1.2em; color: red; }
 [ Konstanz ]

Verbindung
Meersburg Fähre > Konstanz
   

text-wrap

When set to auto, the label text will be wrapped to make the node size smaller, alignments on individual line breaks are ignored.. The default none makes the label text appear exactly as it was written, with manual line breaks applied. One of: auto, none.
Defaults to: none
Example graph:

node { text-wrap: auto; }
 ( Nodes:
 [ Frankfurt (Oder) liegt an der
   ostdeutschen Grenze und an der Oder ] -->
 [ Städte innerhalb der
   Ost-Westfahlen Region mit sehr langen Namen] )
  Nodes:    
  Frankfurt (Oder) liegt an der ostdeutschen Grenze und an der Oder     >   Städte innerhalb der Ost-Westfahlen Region mit sehr langen Namen  
   
     

title

The text displayed as mouse-over for nodes/edges, or as the title for the graph. If empty, no title will be generated unless autotitle is set.
Defaults to:
Example value: My title