Execute Graphviz Actions

Execute Graphviz actions use the Graphviz graphics package to generate directed or undirected graphs that are stored in Image datasets. In order to use this action, Graphviz must be installed on the LiveCompare server, and in the Configuration - General screen, the GraphvizPath field must be set to the directory location of the Graphviz program files.

Execute Graphviz actions generate graphs using:

  • The specified layout engine, stored in the Command action property.

  • Graph attributes stored in the Graph Attributes action property.

  • Default node attributes stored in the Node Attributes action property.

  • Source data specifying the graph’s nodes and links, stored in the Source action property.

Action Property Description
Graph Attributes A String List parameter specifying the display attributes for the graph. The parameter should be set to a list of <Attribute>=<Value> entries, with each entry stored as a separate list element.
Node Attributes A String List parameter specifying the display attributes for the graph’s nodes. A String List parameter specifying the display attributes for the graph. The parameter should be set to a list of <Attribute>=<Value> entries, with each entry stored as a separate list element.
Result An Image dataset which stores the generated graph.
  A Table parameter or dataset which defines the graph’s nodes and their connections.
Source A Table parameter or dataset which defines the graph’s nodes and their connections.

Command

The Command parameter specifies which layout engine to use for generating graphs. It may be set to one of the following:

Command Description

dot

Used to generate directed graphs.
fdp A layout engine for undirected graphs.
neato Generates ‘spring model’ or ‘energy minimized’ graphs.
sfdp A layout engine for undirected graphs that scales to generate very large graphs.
twopi

Used for radial graph layouts.

Graph Attributes

Graph Attributes specify the display attributes for the graph. The following attributes may be set in the Graph Attributes parameter, using the format <Attribute>=<Value> for each string element.

Attribute Description
label The label or caption to be displayed on the graph’s background, for example, “My Graph”.
labelloc The location of the graph’s label, either top or bottom. If this attribute is not set, bottom is used as the default.
labeljust The horizontal alignment used to display the graph’s label, either left, center or right. If this attribute is not set, center is used as the default.
fontname The font to be used for the label text, for example, helvetica, "helvetica bold", "helvetica bold italic". If this attribute is not set, times-roman is used as the default.
fontcolor The color to be used for the label text, for example, blue. If this attribute is not set, black is used as the default.
fontsize The point size of the label text, for example 10. If this attribute is not set, 14 is used as the default.

A complete list of graph attributes may be found at: http://www.graphviz.org/doc/info/attrs.html.

Node Attributes

Node Attributes specify the display attributes for the graph’s nodes. The following attributes may be set in the Node Attributes parameter, using the format <Attribute>=<Value> for each string element.

 

Attribute Description
sides The number of sides that the nodes have, used only of the shape attribute is set to polygon. If this attribute is not set, 4 is used as the default.
color The background color used for the nodes, for example yellow. If this attribute is not set, white is used as the default.
style The style used to display the nodes, either filled, striped, wedged, diagonals or rounded. Note that the striped style is only supported for rectangular nodes. If this attribute is not set, the nodes will be displayed as unfilled.
fontname The font to be used for the nodes’ text, for example, helvetica, "helvetica bold", "helvetica bold italic". If this attribute is not set, times-roman is used as the default.
fontcolor The color to be used for the nodes’ text, for example, blue. If this attribute is not set, black is used as the default.
fontsize The point size of the nodes’ text, for example 10. If this attribute is not set, 14 is used as the default.

A complete list of node attributes may be found at: http://www.graphviz.org/doc/info/attrs.html.

Source

The Source table parameter or dataset defines the nodes in the graph and their connections. The Source table should have the following columns:

Column Description
SOURCE The name of a source node.
TARGET The name of a target node to which the source node is linked.
SOURCE_ATTRIBUTES The node attributes for the source node, specified as a comma-separated list of <Attribute>=<Value> entries. Any attributes specified in this column for individual nodes overwrite the attributes set in the Node Attributes parameter.
TARGET_ATTRIBUTES The node attributes for the target node, specified as a comma-separated list of <Attribute>=<Value> entries. Any attributes specified in this column for individual nodes overwrite the attributes set in the Node Attributes parameter.
EDGE_ATTRIBUTES The attributes used to display the link between two nodes, specified as a comma-separated list of <Attribute>=<Value> entries.

The following attributes may be specified in the EDGE_ATTRIBUTES column:

Attribute Description
label A text label associated with the link, for example, “My Link”.
fontname The font to be used for the label text, for example, helvetica, "helvetica bold", "helvetica bold italic". If this attribute is not set, times-roman is used as the default.
fontcolor The color to be used for the label text, for example, blue. If this attribute is not set, black is used as the default.
fontsize The point size of the label text, for example 10. If this attribute is not set, 14 is used as the default.
penwidth The width of the link in points. If this attribute is not set, 1 is used as the default.
arrowhead The style to be used for the arrowhead on the head node of a link, for example, normal, inv, dot, invdot, none, empty. If this attribute is not set, normal is used as the default. See http://www.graphviz.org/doc/info/attrs.html#k:arrowType for a complete list of arrow types.
arrowsize A scale factor for the size of arrowheads. If this attribute is not set, 1 is used as the default.

A complete list of edge attributes may be found at: http://www.graphviz.org/doc/info/attrs.html.

Example:

Execute Graphviz action example.

Execute Graphviz Action Examples