Login   Register  
PHP Classes
elePHPant
Icontem

File: sample_bar3d.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_bar3d.php  >  Download  
File: sample_bar3d.php
Role: Example script
Content type: text/plain
Description: Sample 3D Bar Data
Class: QOpenFlash
Display charts using Open Flash
Author: By
Last change: renaming
Date: 6 years ago
Size: 1,005 bytes
 

Contents

Class file image Download
<?php

include_once 'QOpenFlash.class.php';

print 
"<pre>";
// generate some random data
srand((double)microtime()*1000000);

$bar_red = new Bar3d75'#D54C78' );
$bar_red->add('Key''2006'10 );

// add random height bars:
for( $i=0$i<10$i++ ){
  
$bar_red->add(rand(2,5));
}
$bar_blue = new Bar3d75'#3334AD' );
$bar_blue->add('Key''2007'10 );

for( 
$i=0$i<10$i++ ){
    
$bar_blue->add(rand(5,9));
}

$g = new QChartOpenFlash();
$g    ->setTitle'3D Bar Chart''{font-size:20px; color: #FFFFFF; margin: 5px; background-color: #505050; padding:5px; padding-left: 20px; padding-right: 20px;}' )
    ->
setDataSets($bar_red$bar_blue)
    ->
setXAxis3d12 )
    ->
setXAxisColor'#909090''#ADB5C7' )
    ->
setYAxisColor'#909090''#ADB5C7' )
    ->
setXLabels( array( 'January','February','March','April','May','June','July','August','September','October' ) )
    ->
setYMax10 )
    ->
setYSteps)
    ->
setYLegend'Open Flash Chart'12'#736AFF' );
    
echo 
$g->render();
?>