$graph = new PieGraph(640, 480); //tamaño de la letra del titulo y la leyenda $graph->SetShadow(); $db = new PgDB(); //QUERY PARA EL PERIDO ACTIVO $queryPer = "SELECT tipo, anio FROM periodo WHERE activo = TRUE"; $recoPer = pg_query($queryPer); $rowPer = pg_fetch_array($recoPer); $graph->title->Set(utf8_decode("REPORTE TOTAL\n{$rowPer['tipo']} - {$rowPer['anio']}")); $graph->title->SetFont(FF_FONT2, FS_BOLD); $p1 = new PiePlot($data); $p1->value->Show(true); $p1->SetLegends(array("Registradas", "Aceptadas", "Numeros Asignados", "Selladas", "Entrega de Copias", "Entrega de Borrador", "Retiro de Borrador", "Finalizaron")); //la leyenda del gráfico $p1->SetSize(0.3); //el radio del gráfico //$p1->SetAngle(45); //setear el angulo $graph->Add($p1); $graph->Stroke("asd.png"); $this->Image("asd.png", -15, 85, 240, 180); // x, y, ancho, altura. $this->Image("logotipo.jpg", 20, 12, -280); unlink("asd.png"); } } $pdf = new reporte('P', 'mm', 'Letter'); $pdf->AddPage(); $pdf->SetFont("Arial", "B", 12); $pdf->graficarPDF(); $pdf->Output("estadisticas_hitos.pdf", "D");