addTitle("Polar Vector Chart Demonstration", "arialbi.ttf", 15, 0xffffff); $textBoxObj->setBackground(0x000080); # Set plot area center at (230, 240) with radius 180 pixels and white background $c->setPlotArea(230, 240, 180, 0xffffff); # Set the grid style to circular grid $c->setGridStyle(false); # Set angular axis as 0 - 360, with a spoke every 30 units $angularAxisObj = $c->angularAxis(); $angularAxisObj->setLinearScale(0, 360, 30); # Add sectors to the chart as sector zones for($i = 0; $i < count($data); ++$i) { $angularAxisObj = $c->angularAxis(); $angularAxisObj->addZone($angles[$i], $angles[$i] + 15, 0, $data[$i], 0x33ff33, 0x008000); } # Add an Transparent invisible layer to ensure the axis is auto-scaled using the data $c->addLineLayer($data, Transparent); # output the chart header("Content-type: image/png"); print($c->makeChart2(PNG)); ?>