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 Title
graphsize - text empty Graph size (in pixels)
graphlegend - yes/no no Show graph legend or not
graphlabel - yes/no no Graph label
graphlink - yes/no no Graph link
graphcolor - yes/no no Graph color
arrowdirection rankdir text LR Arrow direction
nodeshape - text no The shape of each node on the graph
relation - text child Are the subjects or nameproperties parents or childs?
nameproperty - text no Allows setting a property that will be used as subject instead of the actual subject
wordwraplimit - whole number 25 Word wrap limit (in # 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