2D-pie Chart with Labels
<?php define ('GChart_DIR',dirname(__FILE__).'/gchart'); require_once (GChart_DIR.'/GChart.php'); $pie2d=new GChart_Pie2D(250,150); $pie2d->add(50,'First'); $pie2d->add(25,'Second'); $pie2d->add(6,'Third'); ?> <img src="<?php echo $pie2d->get_image_string(); ?>" />
or use the following code:
<?php define ('GChart_DIR',dirname(__FILE__).'/gchart'); require_once (GChart_DIR.'/GChart.php'); $pie2d=new GChart_Pie2D(250,150); $pie2d->add(array('First'=>50,'Second'=>25,'Third'=>6)); ?> <img src="<?php echo $pie2d->get_image_string(); ?>" />