01.12.2012 Views

7 Components: the Function Pages - Developers

7 Components: the Function Pages - Developers

7 Components: the Function Pages - Developers

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

%HIDECOMMENTS% Activates or deactivates <strong>the</strong> option of including<br />

comments in <strong>the</strong> presentation<br />

Example: Set HIDECOMMENTS =<br />

on<br />

21.4<br />

Generating Visuals for Statistics using Diagrams<br />

(Chart Plugin)<br />

Diagrams are irreplaceable in providing visualization. The depiction<br />

of trends and statistics are essential in projects, including our conference.<br />

Perhaps you wish to portray <strong>the</strong> number of visitors over <strong>the</strong><br />

course of <strong>the</strong> conference, for instance. Now that we are nearing <strong>the</strong><br />

end of our Wiki project, we would like to present <strong>the</strong> Chart Plugin. It<br />

can be used to generate very simple diagrams in <strong>the</strong> wiki.<br />

This plugin provides a function that is often familiar from<br />

spreadsheets: The program generates a diagram based on <strong>the</strong> identified<br />

database.<br />

In <strong>the</strong> TWiki, <strong>the</strong> database consists of a table that by default<br />

should be in <strong>the</strong> same topic. However, <strong>the</strong>re is also <strong>the</strong> option of citing<br />

tables from o<strong>the</strong>r pages. There are five different types of diagrams<br />

that can be selected, which can also be combined with each<br />

o<strong>the</strong>r. Fur<strong>the</strong>rmore, it is possible to set several diagram parameters,<br />

such as <strong>the</strong> color combinations. The generated diagram is created in<br />

jpeg or png format. All diagrams on a page are located in <strong>the</strong> open<br />

folder of <strong>the</strong> corresponding web. Thus, o<strong>the</strong>rs also have access to <strong>the</strong><br />

diagrams.<br />

Note: For <strong>the</strong> Chart plugin, you will also need <strong>the</strong> additional Perl<br />

module GD. You also have to install it retroactively with CPAN.<br />

GD, in turn, requires <strong>the</strong> graphic library gdlib to be in your system.<br />

You can obtain fur<strong>the</strong>r information at http://www.boutell.com/gd/.<br />

21.4.1<br />

Syntax<br />

To generate a diagram on a page, insert <strong>the</strong> variable<br />

%CHART{...}% in <strong>the</strong> appropriate spot. The diagram type, data<br />

source and diagram attributes are to be defined inside <strong>the</strong> curly<br />

brackets.<br />

21.4 Generating Visuals for Statistics using Diagrams<br />

(Chart Plugin)<br />

Statistics<br />

Mode of<br />

operation<br />

�<br />

�<br />

�<br />

333

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!