SetScale("textlin"); $graph->SetShadow(); $graph->SetMarginColor('white'); $graph->img->SetMargin(70,40,0,40); $i = 1; while(list($k, $v) = each($data)){ ${"b".$i."plot"} = new BarPlot($v); if(!$type){ ${"b".$i."plot"} -> value->Show(); ${"b".$i."plot"} -> value->SetFormat('%d'); ${"b".$i."plot"} -> value->SetFont(FF_FONT1,FS_BOLD); ${"b".$i."plot"} -> SetValuePos('top'); } ${"b".$i."plot"} -> SetLegend($stat[$k]); ${"b".$i."plot"} -> SetFillColor($color[$k]); $data_array[] = ${"b".$i."plot"}; $i++; } $gbplot = new GroupBarPlot($data_array); $graph->Add($gbplot); $graph->legend->Pos(0.012,0.13,"right","center"); $graph->title->Set($title); $graph->xaxis->title->Set($bottom); $graph->yaxis->title->Set($left); $graph->title->SetFont(FF_FONT1,FS_BOLD); $graph->yaxis->title->SetFont(FF_FONT1,FS_BOLD); $graph->xaxis->title->SetFont(FF_FONT1,FS_BOLD); // Display the graph $graph->Stroke(); } $exp = explode("|", $data); while(list($k, $v) = each($exp)){ $exx = explode("@", $v); $stat[] = $exx[0]; $color[] = $exx[2]; $data_array[] = explode(",", $exx[1]); } grp_bar($data_array, $color, $stat, "Auction Month Graph", "", "Month", $type, $mode); ?>