addTitle($arr_val['titolo1'], "timesbi.ttf", 14); # Set the plotarea at (50, 55) and of 440 x 280 pixels in size. Use a vertical # gradient color from light blue (f9f9ff) to blue (6666ff) as background. Set border # and grid lines to white (ffffff). $c->setPlotArea(50, 55, 500, 280, $c->linearGradientColor(0, 55, 0, 335, 0xf9f9ff, 0x6666ff), -1, $bkgColor, $bkgColor); #Set the labels on the x axis. $labelsObj = $c->xAxis->setLabels($labels); // $labelsObj->setFontAngle(90); # Draw the ticks between label positions (instead of at label positions) $c->xAxis->setTickOffset(0.5); # Set axis label style to 8pts Arial Bold $labelsObj = $c->xAxis->setLabelStyle("arialbd.ttf", 10); $labelsObj->setFontAngle(45); $c->yAxis->setLabelStyle("arialbd.ttf", 8); # Set axis line width to 2 pixels $c->xAxis->setWidth(2); $c->yAxis->setWidth(2); # Add axis title $c->yAxis->setTitle($arr_val['setYAxis']); $layer = $c->addBarLayer3($arr_val['data'], "", "", 5); // $layer->setAggregateLabelFormat("{value}<*br*> ({percent}%)"); $layer->setAggregateLabelFormat("{value|2.,}"); $textBoxObj = $layer->setAggregateLabelStyle("verdanab.ttf", 8); // $textBoxObj->setFontColor(0x6666ff) ; # Set bar border to transparent. Use glass lighting effect with light direction from # left. $layer->setBorderColor(Transparent, glassEffect(NormalGlare, Left)); # Configure the bars within a group to touch each others (no gap) // $layer->setBarGap(0.2, TouchBar); $layer->setBarGap(0.2, 0.5); # output the chart header("Content-type: image/png"); print($c->makeChart2(PNG)); ?>