GraphViz support
1. Introduction
There are four CommandLine options that can be used:
2. Prerequisite: GraphViz
You need to install GraphViz with the dot program.
You can install it
-
from GraphViz website,
-
or using a package manager for your system, like
sudo apt install graphvizon Debian/Ubuntu.On Windows, you can use Chocolatey. Install Chocolatey itself first, using PowerShell, and then follow installation instructions for
Graphvizpackage. After the installation,dotand other GraphViz utilities should be already available on$PATH(make sure to close + reopen applications to see new environment variables).
3. Options to create graph files
Command-line options --graphviz-uses and --graphviz-classes will cause generation of GVUses.dot and
GVClasses.dot files that can be used as input for the dot program. Follow PasDoc execution by commands like this:
dot -T png GVUses.dot > GVUses.png dot -T png GVClasses.dot > GVClasses.png
This will generate a file GVUses.png containing a graph of unit
dependencies and GVClasses.png containing a graph of class dependencies.
Tip: The generated graph is usually rather wide which makes it a bit awkward to use. By setting the "rankdir" graph attribute to "LR" the graph will be built left to right rather than the default top to bottom direction resulting in a much more convenient format:
dot -Grankdir=LR -T png GVUses.dot > GVUses.png
4. Options to link to graphs in documentation
Command-line options --link-gv-uses and --link-gv-classes will add a link to the overview
frame pointing to the pictures generated with dot. You must pass the
file extension of the picture (dot can also generate gif and lots of
other formats). So if you generate png you must call
PasDoc with a CommandLine like
this:
pasdoc --link-gv-uses png --link-gv-classes png --graphviz-uses --graphviz-classes ...