setPieSize(140, 130, 80);
# Add a title to the pie to show the start angle and direction
if ($chartIndex == 0) {
$c->addTitle("Start Angle = 0 degrees\nDirection = Clockwise");
} else {
$c->addTitle("Start Angle = 90 degrees\nDirection = AntiClockwise");
$c->setStartAngle(90, false);
}
# Draw the pie in 3D
$c->set3D();
# Set the pie data and the pie labels
$c->setData($data, $labels);
# Explode the 1st sector (index = 0)
$c->setExplode(0);
# Output the chart
$viewer->setChart($c, SVG);
# Include tool tip for the chart
$viewer->setImageMap($c->getHTMLImageMap("", "", "title='{label}: US\${value}K ({percent}%)'"));
}
# This example includes 2 charts
$viewers = array();
for ($i = 0; $i < 2; ++$i) {
$viewers[$i] = new WebChartViewer("chart$i");
createChart($viewers[$i], $i);
}
?>
Start Angle and Direction
Start Angle and Direction
renderHTML(), " ";
}
?>