PHP Classes

File: example.php

Recommend this page to a friend!
  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: 13 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(255, 255, 255);
$diagram->setColorGraph(0, 0, 0);
$diagram->setFont('fonts/Verdana.ttf', 12, array(0, 0, 0));
$diagram->showDiagram(1, array(array(6, 'title 1', 0, 0, 0), array(3, 'title2', 222, 0, 0), array(5, 'title3', 0, 0, 0), array(1, 'title4', 0, 0, 0), array(2, 'title5', 0, 0, 0)));

// 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)));
 */
?>