HowTo: Nice Charts

Since version 3.4 Kajona is shipped with the chart-component „ez components“ (from now on called ezc) by default.
In the default-configuration, the charts created with the library may result in images being not that pretty.
This HowTo describes two ways to get nicer charts. Either by tuning the ezc library or by switching to pChart.

ez Components

In the default installation, Kajona makes use of ez components' graph library in order to render statistical charts.
Images rendered may look like the following:





This rendering still has the potential to be optimized. Therefore, the installation of the php-component „cairo“ is necessary. As soon as this component ist available, Kajona makes use of this component automatically. The images will result in something like the following:





 

 

The installation of the cairo-component is described on the website of the project:

http://pecl.php.net/package/cairo

In most cases, this requires an administrative-access to the webserver. As soon as Kajona finds the the component to be installed, it will be used. Further configuration of the ezc library is not necessary.

If it's not possible to install cairo on the system, the switch the pChart may be another solution.

 

pChart

Until Kajona 3.3.1, pChart was shipped with Kajona as the default extension for statistical images but was removed from the Kajona packages due to licensing issues up from version 3.4. Depending on the type of project Kajona is used for, pChart may still be used. Therefore the download of pChart has to be performed by the user manually, respecting the licence of pChart.

More information about the pChart library and the licence can be found at the projects' website:

http://pchart.sourceforge.net/

The interface in Kajona expects version 1.27c of pChart, a package based on the original may be downloaded from http://www.kajona.de/downloads.get_kajona-Tools.openDlFolder.149b46649fc616a9975e.de.html .

The component should be places in the folder /system/pChart, resulting in the following files inside the folder: pCache.class, pChart.class and pData.class. If the package was downloaded from Kajona directly, it may be copied to the Kajona folder directly. To make use of the charting-library, switch the library to be used by switching the system-setting „Chart-library used“ (Module System → System-Settings → System) to „pchart“. Afterwards, the images should look something like the following: