Subversion Repositories Applications.gtt

Rev

Rev 61 | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
60 jpm 1
<?php
2
/*
3
 * This work is hereby released into the Public Domain.
4
 * To view a copy of the public domain dedication,
5
 * visit http://creativecommons.org/licenses/publicdomain/ or send a letter to
6
 * Creative Commons, 559 Nathan Abbott Way, Stanford, California 94305, USA.
7
 *
8
 */
9
 
10
require_once "../BarPlot.class.php";
11
 
12
$graph = new Graph(400, 400);
13
$graph->title->set('Two bars');
14
 
15
$values = array(12, 8, 13, 2, 4);
16
 
17
$group = new PlotGroup;
18
$group->setPadding(NULL, NULL, 35, NULL);
19
 
20
$plot = new BarPlot($values, 1, 2);
21
$plot->setBarColor(new LightBlue(25));
22
$plot->setBarSpace(5);
23
 
24
$group->add($plot);
25
 
26
$values = array(1, 7, 2, 10, 6);
27
 
28
$plot = new BarPlot($values, 2, 2);
29
$plot->setBarColor(new LightOrange(25));
30
$plot->setBarSpace(5);
31
 
32
$group->add($plot);
33
 
34
$graph->add($group);
35
$graph->draw();
36
 
37
?>