Help talk:Graph format
- [View source↑]
- [History↑]
Contents
Thread title | Replies | Last modified |
---|---|---|
Alternatives for GraphViz extension | 0 | 17:52, 20 September 2021 |
Alternatives for GraphViz extension | 0 | 17:46, 20 September 2021 |
Error: Image is invalid or non-existent. | 1 | 17:15, 2 July 2015 |
Version of GraphViz | 0 | 18:43, 16 December 2014 |
Can I use only one graph in a page ? | 2 | 04:43, 18 June 2014 |
Legend & Color without label? | 0 | 14:56, 13 May 2014 |
Nameproperty | 0 | 13:39, 8 November 2013 |
Missing parameter documentation in 1.8? | 2 | 00:30, 15 February 2013 |
Graph background color (or transparency)? | 0 | 20:49, 5 February 2013 |
graphlink=Yes KO ? | 5 | 14:48, 1 February 2013 |
graph result format can now work with Extension "External Data" and without the defunct Extension "GraphViz". See an example at https://traditio.wiki/%D0%A2%D1%80%D0%B0%D0%B4%D0%B8%D1%86%D0%B8%D1%8F:%D0%9F%D0%BE%D0%BD%D1%8F%D1%82%D0%B8%D1%8F/graphviz.
The necessary settings are:
// GraphViz:
$edgExeName ['graphviz'] = 'GraphViz';
$edgExeUrl ['graphviz'] = 'https://graphviz.org/';
$edgExeCommand ['graphviz'] = 'dot -K$layout$ -Tsvg';
$edgExeParams ['graphviz'] = ['layout' => 'dot'];
$edgExeParamFilters ['graphviz'] = ['layout' => '/^dot|neato|twopi|circo|fdp|osage|patchwork|sfdp$/'];
$edgExeInput ['graphviz'] = 'dot';
$edgExePreprocess ['graphviz'] = 'EDConnectorExe::wikilinks4dot';
$edgExePostprocess ['graphviz'] = 'EDConnectorExe::innerXML';
$edgExeTags ['graphviz'] = 'graphviz';
After updating to MW 1.25, updating and installing these packages:
"mediawiki/semantic-forms": "^3.3", "mediawiki/semantic-media-wiki": "^2.2", "mediawiki/semantic-result-formats": "^2.1", "mediawiki/graph-viz": "*", "mediawiki/image-map": "@dev"
I see
Error: Image is invalid or non-existent.
Here's what I see in the logs:
[Thu Jul 02 09:00:04 2015] [error] [client 199.166.207.207] PHP Warning: Missing argument 4 for GraphViz::graphvizParserHook(), called in /opt/webs/su.nicer.info/docs/mw/extensions/SemanticResultFormats/formats/graphviz/SRF_Graph.php on line 115 and defined in /opt/webs/su.nicer.info/docs/mw/extensions/GraphViz/GraphViz_body.php on line 784, referer: http://su.nicer.info/mw/index.php?title=Main_Page&action=edit [Thu Jul 02 09:00:04 2015] [error] [client 199.166.207.207] PHP Notice: Undefined variable: frame in /opt/webs/su.nicer.info/docs/mw/extensions/GraphViz/GraphViz_body.php on line 802, referer: http://su.nicer.info/mw/index.php?title=Main_Page&action=edit
fwiw, the platform's dot - graphviz version 2.26.3 (20100126.1600)
Thanks.
After upgrading a wiki to MW 1.24 I noticed that an older GraphViz version wouldn't work anymore. I then updated. Except for the graphname
parameter our SRF graphs seem to work again. Since I hardly can believe that one should use a 2-year old graphviz version from the SVN I also changed the documentation page of this wiki. Hopefully, this is was right, else please undo :)
To fix the graphname problem: I think that new GraphViz versions rather want something like this: <graphviz renderer="neato" caption="Graph for example no. 2">. I am getting the following kind of error message:
Error: SandBox_digraph_Liens_entre_modules_2.src:1: syntax error near line 1 context: digraph Liens >>> entre <<< modules 2 {size="10,500";node [shape=box];rankdir=TB; "4C-ID" [URL = "[[4C-ID]]"];
"Liens entre modules" was | graphname=Liens entre modules 2
Hi, When I ask for two graphs in the same page, both are the same. E.g. the following should be different:
{{#ask: [[Category:Bases psychopédagogiques des technologies éducatives]]
|? page suivante
| format=graph
| graphcolor=yes
| graphlink=yes
| nodeshape=box
| graphname=Liens entre modules
| graphlegend=yes
| graphlabel=yes
| graphsize=10,500
| rankdir=TB
}}
{{#ask: [[Category:Bases psychopédagogiques des technologies éducatives]]
|? page suivante
|? page parente
| format=graph
| graphcolor=yes
| graphlink=yes
| nodeshape=box
| graphname=Liens entre modules 2
| graphlegend=yes
| graphlabel=yes
| graphsize=10,500
| rankdir=TB
}}
Looking at the graphviz file names. It only creates one file as opposed to two.
-rw-r--r-- 1 www-data www-data 117730 oct 1 19:08 SandBoxdigraph .png -rw-r--r-- 1 www-data www-data 2340 oct 1 19:08 SandBoxdigraph .map
In principle, Graphviz can do more than one drawing on a page.
SRF Version (latest from GIT master, 1.9 alpha)
Online example (wiki is public read / difficult signup)
- Sandbox: http://edutechwiki.unige.ch/fr/SandBox#Semantic_Mediawiki
- Intended use: http://edutechwiki.unige.ch/fr/Bases_psychop%C3%A9dagogiques_des_technologies_%C3%A9ducatives (contents may change)
- greetings ! Daniel PS: If you don't have time for fixing it (sorry my programming is too weak to help), we could add this limit to the documentation page.
The problem is in SRFGraph::getParamDefinitions (SRF_Graph.php). The solution is to change the first instance of "graphsize" to "graphname" in this function (making $params['graphname'] agree with 'srf_paramdesc_graphname').
Opened an issue: https://github.com/SemanticMediaWiki/SemanticResultFormats/issues/43
When I just use graphcolor = yes and graphlegend = yes, all arrows stay black and no legend is displayed, only if I add graphlabel = yes, the colors and legend appear, but they are then made gratuitous by the labels. Is there any way to show the legend & colors without labels on the edges?
All, I'm trying to use Graph with the 'nameproperty' variable.
E.g.
{{#ask: [[Category:City]] | ?located in | nameproperty=area | format=graph }}
That doesn't seem valid on this installation for me to test, but on my own installation of SMW, the 'nameproperty' variable seems to not work as I'd expect. I'd think the format would be "nameproperty=My Property Name", and then the nodes of the graph would take the value in that property for each page as the text label, but it doesn't work. It does work without trying to set nameproperty.
I use SRF 1.8 and realized by looking into PHP code, what about parameter 'relation=parent'?
I'm not sure to what degree this feature would be limited by the Extension:GraphViz or GraphViz itself, but being able to change the background color would be nice.
Hello,
I am testing 1.8 ResultFormat extension, and it seems that we lost the "graphlink=Yes" functionality. with same database and previous extensions, links come back. Are you experimenting the same behaviour ?
I am experiencing the same thing, but haven't investigated further! Leo Wallentin (talk) 16:01, 25 October 2012 (CEST)
Same experience for SRF 1.8 it works with lower case graphlink=yes. Not sure why, maybe they changed boolean handling in Semantic Mediawiki