Help:Graph format

From semantic-mediawiki.org
Jump to: navigation, search
Graph format
Displays the relation between pages
Further Information
Provided by: Semantic Result Formats
Added: 1.4.2
Removed: still supported
Requirements: GraphViz
Format name: graph
Enabled by default: 
Indicates whether the result format is enabled by default upon installation of the respective extension.
No
Authors: Frank Dengler, Jeroen De Dauw
Categories: graph
Group:
Table of Contents

↓ INFO ↓

The result format graph, part of the Semantic Result Formats extension, can be used to display result values as a graph showing the relation between pages. In order to work the GraphViz extension is required to be installed, too.

Parameters

Format specific
Parameter Aliases Type Default Description
graphname - text QueryResult Sets the title of the graph
graphsize - text empty Sets the size of the grapht in pixels
graphlegend - yes/no no Sets whether a graph legend should be shown
graphlabel - yes/no no Sets the label of the graph
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
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
nameproperty - text no Sets the property that will be used as subject instead of the actual subject, i.e. page name
wordwraplimit - whole number 25 Sets the word wrap limit (in number of characters)

NoteNote:

  • graphsize - See also kpointf
  • nodeshape - See also shapes
  • arrowdirection - L=left, R=right, T=top, B=bottom

Example

{{#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

Enabling

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 Semantic Result Formats extension.


This documentation page applies to all SMW versions from 1.4.2 to the most current version.
     

Help:Graph format en 1.4.2