setPlotArea(30, 20, 200, 200); # Add a bar chart layer using the given data $c->addBarLayer($data); # Set the labels on the x axis. $c->xAxis->setLabels($labels); # output the chart header("Content-type: image/png"); print($c->makeChart2(PNG)); ?>