Login   Register  
PHP Classes
elePHPant
Icontem

File: sample_pie.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of Tom Schaefer  >  QOpenFlash  >  sample_pie.php  >  Download  
File: sample_pie.php
Role: Example script
Content type: text/plain
Description: Sample Pie
Class: QOpenFlash
Display charts using Open Flash
Author: By
Last change: renaming
Date: 6 years ago
Size: 587 bytes
 

Contents

Class file image Download
<?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();
?>