setPlotArea(27, 20, 120, 100); # Set the labels on the x axis $c->xAxis->setLabels($labels); if ($bargap >= 0) { # Add a title to display to bar gap using 8 pts Arial font $c->addTitle(" Bar Gap = $bargap", "arial.ttf", 8); } else { # Use negative value to mean TouchBar $c->addTitle(" Bar Gap = TouchBar", "arial.ttf", 8); $bargap = TouchBar; } # Add a bar chart layer using the given data and set the bar gap $barLayerObj = $c->addBarLayer($data); $barLayerObj->setBarGap($bargap); # output the chart header("Content-type: image/png"); print($c->makeChart2(PNG)); ?>