allwiki首页  
天下维客 你可以修改的网络知识库
首页最近更改优秀条目专题展示电脑科技词典软件学习网络知识电脑安全明星时尚天下百科
 

MediaWiki扩展:图示功能

天下维客,你可以修改的网络知识库

Jump to: navigation, search

本文取自元维基,欢迎共同翻译、整理与大家共享,促进中文wiki发展^_^

Overview

The graph-extension takes a textual graph description between <graph> </graph> tags, and turns it into a pretty flowchart diagram.

It works much like the GraphViz extension, except that it outputs ASCII, HTML, SVG or Graphviz code. The latter then allows rendering of PNG files.

The advantage of textual, SVG or HTML output over an image is that it makes it possible to easily include mouse-over titles and links in the graph, as well as make the graph scalable and zoomable. In addtion, copy & paste is possible, and search engines will index the text in the graph like the node names and edge labels.

Examples

Here is an example, as HTML rendered by Firefix (shown as screenshot due to Meta not allowing <style> </style>)

node { fill: #ffdead; }

[ Berlin ] { fill: #f06060; color: white; } 
  -> [ Rostock ], [ Dresden ], [ Magdeburg ], [ Frankfurt (Oder) ]
 
[ Magdeburg ] .. train ..> [ Aschaffenburg ] { fill: #e0e0ff; border: bold; }

Image:Graph_extension_example.png

Since it is not yet possible to upload SVG files to Meta, please see this SVG example.

Much more details, documentation, the actual code, examples and testcases can be found at my site.

Details & Feedback

The extension uses a Perl module called Graph::Easy to parse the input and render the output.

This is work in progress - but feedback is very much welcome.

原文参见: Graph extension

Personal tools
工具
金银币拍卖 金币拍卖预展  金银币网店 熊猫金银币 生肖金银币