<?php
include_once 'QOpenFlash.class.php';
// generate some random data
srand((double)microtime()*1000000);
$data_1 = array();
$data_2 = array();
$data_3 = array();
for( $i=0; $i<9; $i++ )
{
$data_1[] = rand(2,5);
$data_2[] = rand(4,7);
$data_3[] = rand(5,9);
}
$g = new QChartOpenFlash();
$g ->setTitle( 'Mixed Line and Bar Charts', '{font-size:20px; color: #ffffff; margin:10px; background-color: #d070ac; padding: 5px 15px 5px 15px;}' )
->setBgColor('#FDFDFD')
->setData($data_1)
->setBar( 50, '#9933CC', 'Purple Bar', 10 )
->setData($data_2)
->setBar( 50, '#339966', 'Green Bar', 10 )
->setData($data_3)
->setLineDot(3, 5, '#CC3399', 'Line', 10 )
->setXLabels( array( 'Jan','Feb','Mar','Apr','May','Jun','Jul','Aug','Sep' ) )
->setYMax( 10 )
->setXAxisSteps( 2 )
->setYLegend( 'Sample', 12, '#736AFF' );
echo $g->render();
?>
|