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-20.php' );
?>
gallery-data-20.php
<?php
// generate some random data
srand((double)microtime()*1000000);
$data_1 = array();
$data_2 = array();
for( $i=0; $i<9; $i++ )
{
$data_1[] = rand(21,25);
$data_2[] = rand(21,25);
}
include_once( 'ofc-library/open-flash-chart.php' );
$g = new graph();
$g->title( 'Gothic Department', '{font-size: 25px; color: #FFB900}' );
$g->bg_colour = '#303030';
$g->set_data( $data_1 );
$g->bar( 75, '#FFB900', 'Kittens', 10 );
$g->set_data( $data_2 );
$g->bar( 75, '#28A0DC', 'Puppies', 10 );
$g->set_x_labels( array( 'January','February','March','April','May','June','July','August','September' ) );
$g->set_x_label_style( 14, '#FFFFFF', 2 );
$g->set_x_legend( 'Sacrifice breakdown (2007)', 12, '#FFFFFF' );
$g->set_y_min( 20 );
$g->set_y_max( 30 );
$g->y_label_steps( 2 );
$g->set_y_label_style( 14, '#FFFFFF' );
$g->set_y_legend( 'Totals', 12, '#FFFFFF' );
$g->x_axis_colour( '#D0D0D0', '#808080' );
$g->y_axis_colour( '#D0D0D0', '#808080' );
echo $g->render();
?>