Login   Register  
PHP Classes
elePHPant
Icontem

File: test.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of Garry Lachman  >  GrCharts  >  test.php  >  Download  
File: test.php
Role: Example script
Content type: text/plain
Description: example file
Class: GrCharts
Generate share bar charts in HTML
Author: By
Last change:
Date: 10 years ago
Size: 1,763 bytes
 

Contents

Class file image Download
<?php
/*
    GrCharts 0.1 pre-alha - Charts Php Class from GrClass project.
    ---------------------------------------------------------------
    http://sourceforge.net/projects/grclasses/
    
    Under GNU/GPL.
    ---------------------------------------------------------------
    Change log:
    ---------------------------------------------------------------
    12/10/2004 - Added samples of new function (chartsarray();)
    6/10/2004 - First Version: 0.1 pre-alpha
    ---------------------------------------------------------------
    Build by Garry Lachman., Garry@Nunex.co.il
*/

include("grchart.class.php");
$chart = new grchart;

$chart->start(100);

$chart->add_chart("20");
$chart->add_chart("60");
$chart->add_chart("10");
$chart->add_chart("10");

$chart->init();

?>
<table width="100%" border="1">
<TR>
<TD>Red Style</TD>
<?
$chart
->ch_style("red");
?>
</TR>
<TR>
<td><? print $chart->chart(1?></td>
</TR>
<TR>
<td><? print $chart->chart(2?></td>
</TR>
<TR>
<td><? print $chart->chart(3?></td>
</TR>
<TR>
<td><? print $chart->chart(4?></td>
</TR>
</table>

<br>

<table width="100%" border="1">
<TR>
<TD>Green Style</TD>
<?
$chart
->ch_style("green");
?>
</TR>
<TR>
<td><? print $chart->chart(1?></td>
</TR>
<TR>
<td><? print $chart->chart(2?></td>
</TR>
<TR>
<td><? print $chart->chart(3?></td>
</TR>
<TR>
<td><? print $chart->chart(4?></td>
</TR>
</table>

<br>

<table width="100%" border="1">
<TR>
<TD>Pre Style</TD>
<?
$chart
->ch_style("pre");
?>
</TR>
<TR>
<td><? print $chart->chart(1?></td>
</TR>
<TR>
<td><? print $chart->chart(2?></td>
</TR>
<TR>
<td><? print $chart->chart(3?></td>
</TR>
<TR>
<td><? print $chart->chart(4?></td>
</TR>
</table>
<br>
<?
$chart
->ch_style("green");
$ca $chart->chartsarray();
print 
$ca[1] . "<br>"$ca[2];
?>