setPlotArea(50, 50, $x-(30+.10*$x+$threeD), $y-(75+.10*$y)); $c->addTitle($title); $c->yAxis->setTitle($yaxis); $c->xAxis->setTitle($xaxis); if (! $startcolor) { $startcolor=$color; } if ($horiz) { $barLayerObj = $c->addBarLayer($data, $c->gradientColor(0,0,$x,0,$startcolor,$color)); } else { $barLayerObj = $c->addBarLayer($data, $c->gradientColor(0,$y,0,0,$startcolor,$color)); } if ($threeD) { $barLayerObj->set3D($threeD); } $c->xAxis->setLabels($labels); $c->swapXY($horiz); $barLayerObj->setAggregateLabelFormat("{value}"); $barLayerObj->setAggregateLabelStyle("timesbi.ttf", 10, $labelcolor); header("Content-type: image/png"); print($c->makeChart2(PNG)); }