0) { $pie_labels[]=_('Other')." (". number_format($rem,$format) .") "; //$pie_vals[]=number_format($rem,1); $pie_vals[]=$rem; } } $vals = array(2236,1029,687,623,577,466,302,221,205,188,1009); $labels=array("Jean","Paul","Pierre","Philippe","Aimé","Amédé","Noémi","Noël","Philibert","Alphonse","Autres"); // Create the graph. These two calls are always required $graph = new PieGraph(640, 480,"auto"); //$graph->SetMargin(50,10,35,50); setlocale(LC_TIME, "fr_FR.UTF-8"); //setlocale(LC_TIME, "C"); setlocale(LC_ALL, "fr_FR.UTF-8"); $start=strtotime("12/28/2002"); $end=strtotime("6/30/2004"); //$graph->title->Set(_("Commits By User")." (".date('m/d/Y',$start) ."-". date('m/d/Y',$end) .")"); $graph->title->Set(utf8_decode(_("Commits By User")." (".strftime('%x',$start) ." - ". strftime('%x',$end) .")")); $graph->subtitle->Set(forge_get_config ('forge_name')); // Create the tracker open plot ////report_pie_arr(util_result_column_to_array($res,0), util_result_column_to_array($res,1)); //$pie_vals=$vals; //$pie_labels=$labels; report_pie_arr($labels, $vals,0); //print_r($pie_vals); //print_r($pie_labels); $p1 = new PiePlot3D($pie_vals); $p1->ExplodeSlice (0); $p1->SetLegends($pie_labels); $graph->Add( $p1); // Display the graph $graph->Stroke(); ?>