sub graph (@) {
my %params=@_;
+ if (exists $params{file}) {
+ if (! exists $pagesources{$params{file}}) {
+ error gettext("cannot find file");
+ }
+ $params{src} = readfile(srcfile($params{file}));
+ add_depends($params{page}, $params{file});
+ }
+
# Support wikilinks in the graph source.
my $src=$params{src};
$src="" unless defined $src;
The `graph` directive supports the following parameters:
- `src` - The graphviz source to render.
+* `file` - A file in the wiki containing the graphviz source.
- `type` - The type of graph to render: `graph` or `digraph`. Defaults to
`digraph`.
- `prog` - The graphviz program to render with: `dot`, `neato`, `fdp`, `twopi`,