Extension:Semantic Result Formats/graph format

From MediaWiki.org
Jump to: navigation, search

The result format graph, part of the Semantic Result Formats extension, uses the GraphViz application to show the connections between pages within the query results.

In order to run this format, the GraphViz extension must also be installed.

[edit] Additional query parameters

Parameter Type default Notes
graphname String QueryResult Names the graph
graphlabel Yes or No No Labels the edges
graphcolor Yes or No No Colors the edges
graphlink Yes or No No Links nodes to their wiki pages
graphlegend Yes or No No Displays a legend
arrowdirection LR,RL,TB or BT LR Name since 1.5.4, for older versions, use "rankdir". Specifies the direction of the graph L=left,R=right,T=top,B=bottom
graphsize pointf none Specifies the size of the graph
nodeshape shape none Since 1.5.4. Sets the shape of graph nodes. Allowed values: box, box3d, circle, component, diamond, doublecircle, doubleoctagon, egg, ellipse, folder, hexagon, house, invhouse, invtrapezium, invtriangle, Mcircle, Mdiamond, Msquare, none, note, octagon, parallelogram, pentagon , plaintext, point, polygon, rect, rectangle, septagon, square, tab, trapezium, triangle, tripleoctagon
wordwraplimit whole positive number 25 Since 1.5.4. Wrap lines after these many characters for node text
nameproperty text none Since 1.5.4. A property to use instead of the subject

[edit] Semantic query example

{{#ask: [[Category:Person]]
| ?has child | ?knows
| format=graph
| graphcolor=Yes
| graphlink=Yes
| graphname=PeopleKnows
| graphlegend=Yes
| graphlabel=No
| graphsize=10,100
| rankdir=TB 
}}

[edit] External links

Personal tools
Namespaces
Variants
Actions
Site
Support
Download
Development
Communication
Print/export
Toolbox