Login   Register  
PHP Classes
elePHPant
Icontem

File: test_bar.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of Eugene Panin  >  Graph  >  test_bar.php  >  Download  
File: test_bar.php
Role: Example script
Content type: text/plain
Description: Test script for Barchart
Class: Graph
Author: By
Last change:
Date: 13 years ago
Size: 488 bytes
 

Contents

Class file image Download
<?
require "Color.php";
require 
"Graph.php";
require 
"Barchart.php";

$white = new Color(255,255,255);
$blue = new Color(0,0,255);
$red = new Color(255,0,0);
$green = new Color(0,255,0);

$line = new Barchart(500,500,$white);

$ar1 = array(12,13,16,2,5,10,0,1,2,8);
$ar2 = array(20,13,-1,2,23,11,1,3,4,9);
$ar3 = array(11,15,20,12,6,-10,28,30,10,0);

$line->addArray($ar1$white);
$line->addArray($ar2$green);
$line->addArray($ar3$red);
$line->printHTML();

?>