[ Index ] |
|
Code source de Dolibarr 2.0.1 |
1 <?PHP 2 /* Copyright (C) 2005 Rodolphe Quiedeville <rodolphe@quiedeville.org> 3 * 4 * This program is free software; you can redistribute it and/or modify 5 * it under the terms of the GNU General Public License as published by 6 * the Free Software Foundation; either version 2 of the License, or 7 * (at your option) any later version. 8 * 9 * This program is distributed in the hope that it will be useful, 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 * GNU General Public License for more details. 13 * 14 * You should have received a copy of the GNU General Public License 15 * along with this program; if not, write to the Free Software 16 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 17 * 18 * $Id: brouzouf.class.php,v 1.5 2005/10/20 19:25:11 rodolphe Exp $ 19 * $Source: /cvsroot/dolibarr/dolibarr/htdocs/telephonie/stats/graph/brouzouf.class.php,v $ 20 * 21 */ 22 23 class GraphBrouzouf { 24 25 Function GraphBrouzouf($DB, $file) 26 { 27 $this->db = $DB; 28 $this->file = $file; 29 30 $this->client = 0; 31 32 } 33 34 Function GraphMakeGraph($datas, $labels) 35 { 36 // Create the graph. These two calls are always required 37 38 $height = 240; 39 $width = 360; 40 41 if ($this->width <> $width && $this->width > 0) 42 $width = $this->width; 43 44 $graph = new Graph($width, $height,"auto"); 45 $graph->SetScale("textlin"); 46 $graph->yaxis->scale->SetGrace(20); 47 48 49 $graph->img->SetMargin(50,20,20,40); 50 51 if ($this->type == 'LinePlot') 52 { 53 $b2plot = new LinePlot($datas); 54 } 55 else 56 { 57 $b2plot = new BarPlot($datas); 58 } 59 60 $b2plot->SetFillColor($this->barcolor); 61 62 $graph->xaxis->scale->SetGrace(20); 63 //$graph->xaxis->SetLabelAlign('center','bottom'); 64 65 $graph->Add($b2plot); 66 67 $graph->title->Set($this->titre); 68 69 $graph->xaxis->SetTickLabels($labels); 70 71 // Display the graph 72 73 $graph->img->SetImgFormat("png"); 74 $graph->Stroke($this->file); 75 } 76 77 } 78 ?>
titre
Description
Corps
titre
Description
Corps
titre
Description
Corps
titre
Corps
Généré le : Mon Nov 26 12:29:37 2007 | par Balluche grâce à PHPXref 0.7 |
![]() |