Loading...
 

Mod phplot

PHPlot is a PHP class for on the fly graphs generation. It was started by Afan Ottenheimer in 1998 as an opensource project, and is now co-developed with Miguel de Benito thanks to sourceforge. It is distributed under the terms of the GNU General Public License, and the PHP license. For further information, please check their website: http://www.phplot.com/

Example line graph with labels, legend and left and lower axis titles
Example line graph with labels, legend and left and lower axis titles
.
Example 3d pie chart
Example 3d pie chart

Install

See Mods Admin for instructions on how to install a Mod.

Usage

Once installed, you will see some new lines under the Wiki "edit > wiki help > Show Plugins Help":

Plots a graph on the data using PHPlot:
{PHPLOT(which_data_type=>text-linear|linear-linear|function|linear-linear-error, which_plot_type=>bars|lines|pie|linepoints|points|area)}cells{PHPLOT} - cells separated by ~|~


However, the code itself contains a more detailed description of parameters:

help needed to identify which parameters are usable

// This plugin plots a graph of the input data using PHPLOT's create_chart.php example script.
//
// Parameters:
//   head -- the column header row
//
// Usage:
//   The data (and the head paramter) is given one row per line, with columns
//   separated by ~|~.
//
// Parameters:
//
// Mandatory:
// XSIZE_in=size x of the graph
// YSIZE_in=size y of the graph
// which_data_type=text-linear|linear-linear|function|linear-linear-error
// datarowM[N]=data on cell[M,N]
// which_plot_type=bars|lines|pie|linepoints|points|area
//
// Optional:
// which_dot=diamond|rect|circle|triangle|dot|line|halfline
// maxy_in=max height of graph in units of Y axis
// miny_in=min height of graph in units of Y axis
// ylbl=Y axis label
// xlbl=X axis label
// title=graph title
// which_vti=vertical tick increment
// which_hti=horizontal tick increment
// which_xap=x axis position
//
// {PHPLOT( head => header column 1 ~|~ header column 2 ~|~ header column 3 )}
// row 1 column 1 ~|~ row 1 column 2 ~|~ row 1 column 3
// row 2 column 1 ~|~ row 2 column 2 ~|~ row 2 column 3
// {PHPLOT}

Example 1: data type text-linear, plot type bars

This code:

{PHPLOT(which_data_type=>text-linear,which_plot_type=>bars, head=>header_column_1~|~header_column_2~|~header_column_3)}
a~|~0~|~0~|~0
b~|~1~|~2~|~3
c~|~5~|~6~|~7
d~|~11~|~12~|~13
e~|~8~|~7~|~6{PHPLOT}


Would produce:
{PHPLOT(which_data_type=>text-linear,which_plot_type=>bars, head=>header_column_1~|~header_column_2~|~header_column_3)}
a~|�|�|~0
b~|||~3
c~|||~7
d~| | |~13
e~|||~6{PHPLOT}

Example 2: data type text-linear, plot type lines

This code:

{PHPLOT(which_data_type=>text-linear,which_plot_type=>lines, head=>header_column_1~|~header_column_2~|~header_column_3)}
a~|~0~|~0~|~0
b~|~1~|~2~|~3
c~|~5~|~6~|~7
d~|~11~|~12~|~13
e~|~8~|~7~|~6{PHPLOT}


Would produce:
{PHPLOT(which_data_type=>text-linear,which_plot_type=>lines, head=>header_column_1~|~header_column_2~|~header_column_3)}
a~|�|�|~0
b~|||~3
c~|||~7
d~| | |~13
e~|||~6{PHPLOT}

Example 3: data type linear-linear, plot type lines

This code:

{PHPLOT(which_data_type=>linear-linear,which_plot_type=>lines)}
a~|~0~|~0~|~0
b~|~1~|~2~|~3
c~|~5~|~6~|~7
d~|~11~|~12~|~13
e~|~8~|~7~|~6{PHPLOT}


Would produce:
{PHPLOT(which_data_type=>linear-linear,which_plot_type=>lines)}
a~|�|�|~0
b~|||~3
c~|||~7
d~| | |~13
e~|||~6{PHPLOT}

Example 4: data type linear-linear, plot type linepoints

This code:

{PHPLOT(which_data_type=>linear-linear,which_plot_type=>linepoints)}
a~|~0~|~0~|~0
b~|~1~|~2~|~3
c~|~5~|~6~|~7
d~|~11~|~12~|~13
e~|~8~|~7~|~6{PHPLOT}


Would produce:
{PHPLOT(which_data_type=>linear-linear,which_plot_type=>linepoints)}
a~|�|�|~0
b~|||~3
c~|||~7
d~| | |~13
e~|||~6{PHPLOT}

Example 5: : data type text-linear, plot type pie

This code:

{PHPLOT(which_data_type=>text-linear,which_plot_type=>pie)}
a~|~0~|~0~|~0
b~|~1~|~2~|~3
c~|~5~|~6~|~7
d~|~11~|~12~|~13
e~|~8~|~7~|~6{PHPLOT}


Would produce:
{PHPLOT(which_data_type=>text-linear,which_plot_type=>pie)}
a~|�|�|~0
b~|||~3
c~|||~7
d~| | |~13
e~|||~6{PHPLOT}

Example 6: : data type function, plot type linepoints

This code:

{PHPLOT(which_data_type=>function,which_plot_type=>linepoints)}
a~|~0~|~0~|~0
b~|~1~|~2~|~3
c~|~5~|~6~|~7
d~|~11~|~12~|~13
e~|~8~|~7~|~6{PHPLOT}


Would produce:
{PHPLOT(which_data_type=>function,which_plot_type=>linepoints)}
a~|�|�|~0
b~|||~3
c~|||~7
d~| | |~13
e~|||~6{PHPLOT}

Example 7: : data type linear-linear, plot type points

This code:

{PHPLOT(which_data_type=>linear-linear,which_plot_type=>points)}
a~|~0~|~0~|~0
b~|~1~|~2~|~3
c~|~5~|~6~|~7
d~|~11~|~12~|~13
e~|~8~|~7~|~6{PHPLOT}


Would produce:
{PHPLOT(which_data_type=>linear-linear,which_plot_type=>points)}
a~|�|�|~0
b~|||~3
c~|||~7
d~| | |~13
e~|||~6{PHPLOT}

Example 8: : data type linear-linear, plot type area

This code:

{PHPLOT(which_data_type=>linear-linear,which_plot_type=>area)}
a~|~0~|~0~|~0
b~|~1~|~2~|~3
c~|~5~|~6~|~7
d~|~11~|~12~|~13
e~|~8~|~7~|~6{PHPLOT}


Would produce:
{PHPLOT(which_data_type=>linear-linear,which_plot_type=>area)}
a~|�|�|~0
b~|||~3
c~|||~7
d~| | |~13
e~|||~6{PHPLOT}

Related pages


Page last modified on Tuesday 17 July, 2007 20:10:08 GMT-0000

doc.tiki.org

Bootstrap AdminGuide UserGuide

Keywords

Keywords serve as "hubs" for navigation within the Tiki documentation. They correspond to development keywords (bug reports and feature requests):

Accessibility (WAI and 508)
Accounting
Articles and Submissions
Backlinks
Banners
Batch
BigBlueButton audio/video/chat/screensharing
Blog
Bookmark
Browser Compatibility
Link Cache
Calendar
Category
Chat
Clean URLs
Comments
Communication Center
Compression (gzip)
Contacts (Address Book)
Contact us
Content Templates
Contribution
Cookie
Copyright
Credit
Custom Home and Group Home Page
Date and Time
Debugger Console
Directory of hyperlinks
Documentation link from Tiki to doc.tiki.org (Help System)
Docs
Draw
Dynamic Content
Dynamic Variable
External Authentication
FAQ
Featured links
File Gallery
Forum
Friendship Network (Community)
Gmap Google maps
Groups
Hotword
HTML Page
i18n (Multilingual, l10n, Babelfish)
Image Gallery
Import-Export
Install
Integrator
Interoperability
Inter-User Messages
InterTiki
Kaltura video management
Karma
Live Support
Login
Logs (system & action)
Look and Feel
Lost edit protection
Mail-in
Map with Mapserver
Menu
Meta Tags
Mobile Tiki and Voice Tiki
Mods
Module
MultiTiki
MyTiki
Newsletter
Notepad
Payment
Performance Speed / Load
Permissions
Platform independence (Linux-Apache, Windows/IIS, Mac, BSD)
Polls
Profiles
Profile Manager
Report
Toolbar
Quiz
Rating
Feeds
Score
Search engine optimization
Search
Search and Replace
Security
Semantic links
Shadowbox
Shadow Layers
Share
Shopping cart
Shoutbox
Slideshow
Smiley
Social Networks
Spam protection (Anti-bot CATPCHA)
Spellcheck
Spreadsheet
Stats
Surveys
Tags
Task
Tell a Friend, alert + Social Bookmarking
TikiTests
Theme CSS & Smarty
Trackers
Transitions
TRIM
User Administration including registration and banning
User Files
User Menu
Watch
WebDAV
Webmail
Web Services
Wiki History, page rename, etc
Wiki Plugin extends basic syntax
Wiki Syntax
Wiki structure (book and table of content)
Workspace
WSOD
WYSIWYCA
WYSIWYG
XMLRPC

Tiki Newsletter

Delivered fresh to your email inbox!
Newsletter subscribe icon
Don't miss major announcements and other news!
Contribute to Tiki
Show php error messages