[ 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: camenbert.class.php,v 1.1 2005/02/08 12:35:32 rodolphe Exp $ 19 * $Source: /cvsroot/dolibarr/dolibarr/htdocs/telephonie/stats/graph/camenbert.class.php,v $ 20 * 21 */ 22 23 require_once (DOL_DOCUMENT_ROOT."/telephonie/stats/graph/graph.class.php"); 24 25 class GraphCamenbert extends DolibarrGraph { 26 27 Function GraphCamenbert($DB, $file) 28 { 29 $this->file = $file; 30 $this->titre = "Camenbert"; 31 $this->colors = array('pink','yellow','blue','green','red','white','grey'); 32 } 33 34 Function GraphDraw($datas, $legends) 35 { 36 37 // Create the graph. These two calls are always required 38 $graph = new PieGraph(420,260,"auto"); 39 40 $graph->SetColor("gray") ; 41 42 // Create the bar plots 43 44 $pieplot = new PiePlot($datas); 45 46 $pieplot->SetCenter(0.33,0.5); 47 48 // Label font and color setup 49 $pieplot->SetFont(FF_FONT1,FS_BOLD); 50 $pieplot->SetFontColor("darkred"); 51 52 // Use absolute values (type==1) 53 //$pieplot->SetLabelType(0); 54 55 // Label format 56 //$pieplot->SetLabelFormat("%d%%"); 57 58 $pieplot->SetSliceColors($this->colors); 59 60 //$pieplot->SetStartAngle(45); 61 //$pieplot->SetLabelPos(0.6); 62 63 // Size of pie in fraction of the width of the graph 64 $pieplot->SetSize(0.38); 65 66 // Legends 67 $pieplot->SetLegends($legends); 68 $graph->legend->Pos(0.05,0.15); 69 70 $graph->Add($pieplot); 71 72 $graph->title->Set($this->titre); 73 74 $graph->title->SetFont(FF_FONT1,FS_BOLD); 75 76 77 // Display the graph 78 79 $graph->img->SetImgFormat("png"); 80 $graph->Stroke($this->file); 81 } 82 } 83 ?>
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 |
![]() |