rose.php
Back to Chart Graphics
addTitle("Polar Vector Chart Demonstration", "Arial Bold Italic", 15, 0xffffff)->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
$c->angularAxis->setLinearScale(0, 360, 30);
# Add sectors to the chart as sector zones
for($i = 0; $i < count($data); ++$i) {
$c->angularAxis->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
$viewer = new WebChartViewer("chart1");
$viewer->setChart($c, SVG);
?>
Simple Rose Chart
Simple Rose Chart
renderHTML(); ?>