Login   Register  
PHP Classes
elePHPant
Icontem

File: index.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of Diogo Resende  >  Bar Graph generator  >  index.php  >  Download  
File: index.php
Role: Example script
Content type: text/plain
Description: Another example not using any definition file
Class: Bar Graph generator
Generates bar graphs from file definitions
Author: By
Last change:
Date: 2004-04-08 16:48
Size: 379 bytes
 

Contents

Class file image Download
<?php
  
include "class.bargraph.php";
  
  
$g = new BarGraph();
  
$data = array();
  for (
$i 0$i 7$i++) {
    
$data[chr(ord('a') + $i)] = $i;
  }
  
  for (
$i 0$i 6$i++) {
    
$data[chr(ord('h') + $i)] = $i;
  }
  
$g->SetGraphPadding(20302015);
  
$g->SetBarData($data);
  
$g->SetGraphTitle("BarGraph Test");

  
$g->DrawGraph();
?>