Location: PHPKode > scripts > QOpenFlash > sample_pie.php
<?php

include_once 'QOpenFlash.class.php';

// generate some random data
srand((double)microtime()*1000000);

$data = array();
for( $i=0; $i<5; $i++ ){
	$val = rand(5,15);
	$data[] = $val;
	$links[] = "javascript:alert('$val')";
}

$g = new QChartOpenFlash();
$g	->setPie(60,'#505050','{font-size: 14px; color: #404040;}')
	->setPieValues( $data, array('IE','Firefox','Opera','Wii','Other') )
	->setPieColors( array('#d01f3c','#356aa0','#C79810') )
	->setToolTip( '#val#%' )
	->setTitle( 'Pie Chart', '{font-size:18px; color: #d01f3c;}' );
		
echo $g->render();
?>
Return current item: QOpenFlash