Module BaseDoc :: Class GVDoc
[frames] | no frames]

Class GVDoc

source code

Abstract Interface for Graphviz document generators. Output formats for Graphviz reports must implment this interface to be used by the report system.

Instance Methods
 
add_node(self, id, label, shape='box', fillcolor='white', url='', htmloutput=False)
Add a node to this graph.
source code
 
add_link(self, id1, id2, style='', head='', tail='', comment='')
Add a link between two nodes.
source code
 
add_comment(self, comment)
Add a comment to the source file.
source code
 
start_subgraph(self, id)
Start a subgraph in this graph.
source code
 
end_subgraph(self)
End a subgraph that was previously started in this graph.
source code
Method Details

add_node(self, id, label, shape='box', fillcolor='white', url='', htmloutput=False)

source code 

Add a node to this graph. Nodes can be different shapes like boxes and circles.

Parameters:
  • id (string) - A unique identification value for this node. Example: "p55"
  • label (string) - The text to be displayed in the node. Example: "John Smith"
  • shape (string) - The shape for the node. Examples: "box", "ellipse", "circle"
  • fillcolor (string) - The fill color for the node. Examples: "blue", "lightyellow"
  • url (string) - A URL for the node.
  • htmloutput (boolean) - Whether the label contains HTML.
Returns:
nothing

add_link(self, id1, id2, style='', head='', tail='', comment='')

source code 

Add a link between two nodes.

Parameters:
  • id1 (string) - The unique identifier of the starting node. Example: "p55"
  • id2 (string) - The unique identifier of the ending node. Example: "p55"
  • comment (string) - A text string displayed at the end of the link line. Example: "person C is the son of person A and person B"
Returns:
nothing

add_comment(self, comment)

source code 

Add a comment to the source file.

Parameters:
  • comment (string) - A text string to add as a comment. Example: "Next comes the individuals."
Returns:
nothing

start_subgraph(self, id)

source code 

Start a subgraph in this graph.

Parameters:
  • id - The unique identifier of the subgraph. Example: "p55"
  • id1 (string)
Returns:
nothing

end_subgraph(self)

source code 

End a subgraph that was previously started in this graph.

Returns:
nothing