Login   Register  
PHP Classes
elePHPant
Icontem

File: example.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of Lukasz Socha  >  class Graph  >  example.php  >  Download  
File: example.php
Role: Example script
Content type: text/plain
Description: Example using of the script.
Class: class Graph
Render images with bar or pie charts
Author: By
Last change:
Date: 4 years ago
Size: 785 bytes
 

Contents

Class file image Download
<?php
// echo '<img src="class.statistics.php" />';
include 'class.diagram.php';
include 
'class.pieChart.php';
// example which draws a diagram
$diagram=new Diagram;
$diagram->setSizeImage(600,500);
$diagram->setColorBackground(255255255);
$diagram->setColorGraph(000);
$diagram->setFont('fonts/Verdana.ttf'12, array(000));
$diagram->showDiagram(1, array(array(6'title 1'000), array(3'title2'22200), array(5'title3'000), array(1'title4'000), array(2'title5'000)));

// example which draws a Piechart
/*
$pieChart=new PieChart;
$pieChart->setSizeImage(400,400);
$pieChart->setColorBackground(255, 255, 255);
$pieChart->showPieChart(array(array(50, 0, 0, 0), array(100, 0, 255, 0), array(50, 255, 255, 0)));
 */
?>