Help:Graph format

From semantic-mediawiki.org

Jump to: navigation, search

Graph format is a format bringing together the MediaWiki Graphviz extension and Semantic MediaWiki. It allows Semantic MediaWiki' inline queries to display query results as graphs.

More about GraphViz can be found at the GraphViz page.

Contents

Requisites

  • Installed and running Semantic Mediawiki Extension, download from here
  • Installed and running Mediawiki extension GraphViz, download from here
    • please use the improved version from [1] including the local wiki URLs.

Install instructions

The graph format is part of the Semantic Result Formats. Installation instructions can be found there.

Note that it may be a bit troublesome to install the GraphViz extension due to its current bad maintenance. It would be great if someone cleaned that up.

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
rankdir LR,RL,TB or BT LR Specifies the direction of the graph L=left,R=right,T=top,B=bottom
graphsize pointf none Specifies the size of the graph

Semantic query example

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

To see an example in action go to semanticweb.org and a graph of all countries bordering each other.

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

Help:Graph format en 1.3

Personal tools