donutwidth.php
Back to Chart Graphics
setDonutSize(75, 60, 50, (int)(50 * $donutRadius / 100));
# Add a title to show the donut width
$c->addTitle("Inner Radius = " . $donutRadius . " %", "Arial", 10)->setBackground(0xcccccc, 0);
# Draw the pie in 3D
$c->set3D(12);
# Set the pie data and the pie labels
$c->setData($data, $labels);
# Disable the sector labels by setting the color to Transparent
$c->setLabelStyle("", 8, Transparent);
# Output the chart
$viewer->setChart($c, SVG);
# Include tool tip for the chart
$viewer->setImageMap($c->getHTMLImageMap("", "", "title='{label}: {value}kg ({percent}%)'"));
}
# This example includes 5 charts
$viewers = array();
for ($i = 0; $i < 5; ++$i) {
$viewers[$i] = new WebChartViewer("chart$i");
createChart($viewers[$i], $i);
}
?>
Donut Width
Donut Width
renderHTML(), " ";
}
?>