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
<?php include_once 'ofc-library/open_flash_chart_object.php' ; open_flash_chart_object ( 500 , 260 , 'http://' . $_SERVER [ 'SERVER_NAME' ] . '/open-flash-chart/gallery-data-44.php' ); ?>
gallery-data-44.php
<?php include_once( 'ofc-library/open-flash-chart.php' ); // generate some random data srand ((double) microtime ()* 1000000 ); $bar = new bar_sketch ( 55 , 6 , '#d070ac' , '#000000' ); $bar -> key ( '2006' , 10 ); for( $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 -> set_x_tick_size ( 9 ); $g -> y_axis_colour ( '#e0e0e0' , '#e0e0e0' ); $g -> set_x_labels ( array( 'January' , 'February' , 'March' , 'April' , 'May' , 'June' , 'July' , 'August' , 'September' , 'October' ) ); $g -> set_x_label_style ( 11 , '#303030' , 2 ); $g -> set_y_label_style ( 11 , '#303030' , 2 ); $g -> set_y_max ( 10 ); $g -> y_label_steps ( 5 ); echo $g -> render (); ?>