Gallery - Background Colour

Attribute: string bg_colour

$g->bg_colour = '#DFFFDF';
Note: this is an attribute that is a string HEX colour.

See the HTML example for further examples of bg_colour usage.

Create the flash object

<?php
include_once 'ofc-library/open_flash_chart_object.php';
open_flash_chart_object500300'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->bar75'#FFB900''Kittens'10 );

$g->set_data$data_2 );
$g->bar75'#28A0DC''Puppies'10 );

$g->set_x_labels( array( 'January,February,March,April,May,June,July,August,September' ) );
$g->set_x_label_style14'#FFFFFF');
$g->set_x_legend'Sacrifice breakdown (2007)'12'#FFFFFF' );

$g->set_y_min20 );
$g->set_y_max30 );

$g->y_label_steps);
$g->set_y_label_style14'#FFFFFF' );
$g->set_y_legend'Totals'12'#FFFFFF' );

$g->x_axis_colour'#D0D0D0''#808080' );
$g->y_axis_colour'#D0D0D0''#808080' );

echo 
$g->render();
?>
To see the data produced : gallery-data-20.php, then 'view source'.