Download the PHP package badams/graphviz without Composer
On this page you can find all versions of the php package badams/graphviz. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download badams/graphviz
More information about badams/graphviz
Files in badams/graphviz
Package graphviz
Short Description Temporary fork of alom/graphviz
License MIT
Homepage http://github.com/alexandresalome/graphviz
Informations about the package graphviz
Graphviz
Graphviz generation for PHP
- View CHANGELOG
- View CONTRIBUTORS
Installation
Install the latest version with:
Usage
This library allow you to create Dot Graph with a PHP fluid interface:
Escaping of labels
By default, labels will be escaped, so that your PHP string is represented "as it is" in the graph. If you don't want the label to be escaped, add set the special _escaped attribute to false:
Browsing the graph
When you have created lot of subgraphs and nodes, it might be useful to be able to browse it using identifiers. For example, if you have the following graph:
You can do the following to access the nodes in the existing graph:
When you have a node or an edge, you can manipulate its attributes:
On a graph, you can access or verify edge existence:
Using cluster and record IDs
If you create an edge from/to an ID inside a record, use an array instead of a string:
As you can see in the example above, the edge is composed of two parts:
'B'
: a regular nodearray('A', '1')
: targets the cell "1" inside the A node
This method also work for getEdge, hasEdge and every edge-related method.
Samples
Take a look at examples located in samples folder:
- 00-readme.php: Example from graphviz README
- 01-basic.php: Basic styling of nodes
- 02-table.php: An example for HTML table escaping
You can generate any of those graph by using the following commands: