Create the flash object
<?php
include_once 'ofc-library/open_flash_chart_object.php';
open_flash_chart_object( 500, 300, 'http://'. $_SERVER['SERVER_NAME'] .'/open-flash-chart/gallery-data-19.php' );
?>
gallery-data-19.php
<?php
// generate some random data
srand((double)microtime()*1000000);
$data_1 = array();
$data_2 = array();
for( $i=0; $i<9; $i++ )
{
// rand gives us an integer, so devide it
// by 10 to give us a float number between
// 5 and 9
$data_1[] = rand(50,90)/10;
$data_2[] = rand(-50,-90)/10;
}
include_once( 'ofc-library/open-flash-chart.php' );
$g = new graph();
$g->title( 'min=-10 max=10', '{font-size: 35px; color: #800000}' );
$g->set_data( $data_1 );
$g->bar( 50, '#800000', 'Rusty', 10 );
$g->set_data( $data_2 );
$g->bar_filled( 50, '#9933CC', '#8010A0', 'Purple Nurple', 10 );
$g->set_x_labels( array( 'Jan','Feb','Mar','Apr','May','Jun','Jul','Aug','Sep' ) );
$g->set_y_min( -9.5 );
$g->set_y_max( 10.5 );
$g->y_label_steps( 5 );
$g->set_y_legend( 'Your legend here!', 12, '#736AFF' );
echo $g->render();
?>