The Plotters extension for MediaWiki allows wiki editors to visualize data using scripts created by administrators. Scripts are added in a way similar to the Gadgets extension.
Three types of scripts are available: helpers, preprocessors. and plotters. The script types are loaded in that order so that helpers can be used in preprocessors and plotters, and so that data can be preprocesed before it is plotted.
Wiki editors can use these scripts by using the plot parser function, or tag:
{{#plot: |renderer=plotkit |name=<uniquename> |width=300 |height=300 |script=<scriptname> |scriptarguments=arg1,arg2,... |preprocessors=<preprocessorname1>,<preprocessorname2>,... |preprocessorarguments=<preprocessor1argument1>,<preprocessor1argument2>,... :preprocessor2argument1>,<preprocessor2argument2>,...:...,... |labels=label1,label2 |datasep=, |tableclass=wikitable |data=1,2 2,4}}
or a simpler example:
{{#plot: |renderer=plotkit |script=bar |labels=label1,label2 |data=1,2 2,4}}
Only scripts used in pages are loaded; so, download sizes should be reasonable. ExplorerCanvas is always included for IE support. If javascript is disabled, a table is shown with the raw data; the CSS class that is used for the table can be user defined with the tableclass argument.
Administrators can add and remove available renderers and javascript via configuration options. By default, the plotkit renderer is defined. A default generic renderer is always available that simply outputs a canvas element.
See the Plotters extension page on mediawiki.org [1] for more information. See my sandbox for examples [2]. Bug reports can be placed on the extension's discussion page [3], posted as a comment on the announcement blog post [4], or sent to me via email. Post all support questions on the extension's discussion page.
[1] http://www.mediawiki.org/wiki/Extension:Plotters [2] http://ryandlane.com/sandbox/Plotters [3] http://www.mediawiki.org/wiki/Extension_talk:Plotters [4] http://ryandlane.com/wprdl/2009/06/08/announcing-the-plotters-extension-for- mediawiki/
V/r,
Ryan Lane