Login   Register  
PHP Classes
elePHPant
Icontem

File: sample_barsketch.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_barsketch.php  >  Download  
File: sample_barsketch.php
Role: Example script
Content type: text/plain
Description: Sketch Bar sample
Class: QOpenFlash
Display charts using Open Flash
Author: By
Last change: renaming
Date: 6 years ago
Size: 916 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 BarSketch556'#d070ac''#000000' );
$bar_red->add('Key''2006'10 );

// add random height bars:
for( $i=0$i<10$i++ ){
  
$bar_red->add(rand(2,9));
}
$g = new QChartOpenFlash();
$g    ->setTitle'Sketch''{font-size:20px; color: #ffffff; margin:10px; background-color: #d070ac; padding: 5px 15px 5px 15px;}' )
    ->
setBgColor('#FDFDFD')
    ->
setDataSets($bar_red)
    ->
setXLabelStyle11'#303030')
    ->
setYLabelStyle11'#303030')
    ->
setXLabels( array( 'Jan','Feb','Mar','Apr','May','Jun','Jul','Aug','Sep','Oct' ) )
    ->
setXAxisColor'#e0e0e0''#ADB5C7' )
    ->
setYAxisColor'#e0e0e0''#ADB5C7' )
    ->
setYMax10 )
    ->
setXTickSize)
    ->
setYSteps)
    ->
setYLegend'Open Flash Chart'12'#736AFF' );
    
echo 
$g->render();
?>