Help:Graph format
From semantic-mediawiki.org
Graph format | |
---|---|
Displays the relation between pages | |
Further Information | |
Provided by: | Extension "Semantic Result Formats" |
Added: | 1.4.2 |
Removed: | still supported |
Requirements: | GraphViz |
Format name: | graph |
Enabled? Indicates whether the result format is enabled by default upon installation of the respective extension. | No |
Authors: | Frank Dengler , Jeroen De Dauw |
Categories: | graph |
Table of Contents | |
Contents |
The result format graph, part of the Extension "Semantic Result Formats" extension, can display result values as a graph showing the relation between pages. The extension "GraphViz" (MediaWiki.org) (≤ MediaWiki 1.35.x) or extension "Diagrams" (MediaWiki.org) (≥ MediaWiki 1.36.x) or extension "External Data" (MediaWiki.org) (≥ MediaWiki 1.36.x) should also be installed for this result format.
Parameters[edit]
- Format specific
Parameter | Aliases | Type | Default | Description |
---|---|---|---|---|
graphname | - | text | QueryResult | Sets the title of the graph |
graphsize | - | text | empty | Sets the size of the graph in pixels |
graphfontsize | - | whole number | 10 | ⧼srf-paramdesc-graphfontsize⧽ |
graphlegend | - | yes/no | no | Sets whether a graph legend should be shown |
graphlabel | - | yes/no | no | Sets the font size in pixels |
graphlink | - | yes/no | no | Sets whether nodes should link to their wiki pages |
graphcolor | - | yes/no | no | Sets the color of the graph |
arrowdirection | rankdir | text | LR | Sets the direction of the arrows |
arrowhead | - | text | normal | ⧼srf-paramdesc-arrowhead⧽ |
nodeshape | - | text | no | Sets the shape of each node on the graph |
relation | - | text | child | Sets whether the subjects or nameproperties are parents or childs |
wordwraplimit | - | whole number | 25 | Sets the word wrap limit (in number of characters) |
nodelabel | - | text | empty | Use a graph node label. Allowed values: displaytitle. |
Note:
graphsize
- See also kpointfnodeshape
- See also shapesarrowdirection
- L=left, R=right, T=top, B=bottom
Example[edit]
{{#ask: [[Category:Person]] |?has child |?knows |format=graph |graphcolor=yes |graphlink=yes |graphname=PeopleKnows |graphlegend=yes |graphlabel=no |graphsize=10,100 |rankdir=TB }}
External links[edit]
Enabling[edit]
This result format is not enabled by default on a wiki. To enable it the line
$srfgFormats[] = 'graph';
must be added to the "LocalSettings.php" file below the inclusion of the Extension "Semantic Result Formats" extension.
This documentation page applies to all SMW versions from 1.4.2 to the most current version.