Open Flash Chart
Support This Project :: Home - Gallery - Bar Chart Sketch
Info: Open Flash Chart 2 is out. Version 1.x and these pages will never disappear and the charts will continue working forever, but further development on 1.x has stopped. Take a look at version 2 here Open Flash Chart 2.

Gallery - Bar Chart Sketch

Object: bar_sketch

bar_sketch( $alpha, $offset, $colour, $outline_colour )

The only interesting parameter is the $offset. Think of it as the fun factor. 0,1 and 2 are pretty boring. 4 to 6 is a bit fun, 7 and above is lots of fun.

This inherits from outline_bar, see the bar object for details on the other methods and parameters.

Create the flash object
include_once 'ofc-library/open_flash_chart_object.php';
open_flash_chart_object500260'http://'$_SERVER['SERVER_NAME'] .'/open-flash-chart/gallery-data-44.php' );

include_once( 'ofc-library/open-flash-chart.php' );

// generate some random data

$bar = new bar_sketch556'#d070ac''#000000' );
$bar->key'2006'10 );

$i=0$i<10$i++ )
$bar->data[] = rand(2,9);

$g = new graph();
$g->title'Sketch''{font-size:20px; color: #ffffff; margin:10px; background-color: #d070ac; padding: 5px 15px 5px 15px;}' );
$g->bg_colour '#FDFDFD';

// add the bar object to the graph
$g->data_sets[] = $bar;

$g->x_axis_colour'#e0e0e0''#e0e0e0' );
$g->y_axis_colour'#e0e0e0''#e0e0e0' );

$g->set_x_labels( array( 'January','February','March','April','May','June','July','August','September','October' ) );

$g->set_y_max10 );
To see the data produced : gallery-data-44.php, then 'view source'.
Help support the project: Support This Project