Gallery - Bar Chart Fade
We at Open flash Chart always strive to make things easy for ourselves. So the fade bar charts have exactly the same parameters as
the bar method.
Object: bar_fade()
bar_fade( integer $alpha, string $colour )
See the bar method for details on these 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-35.php' ); ?>
gallery-data-35.php
<?php
include_once( 'ofc-library/open-flash-chart.php' );
// generate some random data srand((double)microtime()*1000000);
$bar_red = new bar_fade( 55, '#C31812' ); $bar_red->key( '2006', 10 );
for( $i=0; $i<10; $i++ ) $bar_red->data[] = rand(2,5);
$bar_blue = new bar_fade( 55, '#424581' ); $bar_blue->key( '2007', 10 );
for( $i=0; $i<10; $i++ ) $bar_blue->data[] = rand(5,9); $g = new graph(); $g->title( 'Fade Bars', '{font-size:20px; color: #bcd6ff; margin:10px; background-color: #5E83BF; padding: 5px 15px 5px 15px;}' ); $g->bg_colour = '#FDFDFD';
$g->data_sets[] = $bar_red; $g->data_sets[] = $bar_blue;
$g->x_axis_colour( '#909090', '#D2D2FB' ); $g->y_axis_colour( '#909090', '#D2D2FB' );
$g->set_x_labels( array( 'January','February','March','April','May','June','July','August','September','October' ) ); $g->set_x_label_style( 11, '#000000', 2 );
$g->set_y_max( 10 ); $g->y_label_steps( 5 ); $g->set_y_legend( 'Open Flash Chart', 12, '#736AFF' ); echo $g->render(); ?>
|
|