Gallery - Inner Background Colour
Method: set_inner_background()
set_inner_background( string $col[, string $col2][, int $angle] )
$col colour
$col2 colour, if set this is the second colour of the gradient
$angle, if set this is the angle of the gradient (90=vertical, 180=horizontal, 45=diag, etc...)
Create the flash object
<?php include_once 'ofc-library/open_flash_chart_object.php'; open_flash_chart_object( '100%', 200, 'http://'. $_SERVER['SERVER_NAME'] .'/open-flash-chart/gallery-data-22.php' ); ?>
gallery-data-22.php
<?php
// generate some random data srand((double)microtime()*1000000);
// // NOTE: how we are filling 3 arrays full of data, // one for each line on the graph // $data_1 = array(); $data_2 = array(); for( $i=0; $i<9; $i++ ) { $data_1[] = rand(11,18); $data_2[] = rand(5,10); }
include_once( 'ofc-library/open-flash-chart.php' ); $g = new graph(); $g->title( 'Inner Background', '{font-size: 22px; color: #000000}' );
// we add 3 sets of data: $g->set_data( $data_1 ); $g->set_data( $data_2 );
$g->line_dot( 3, 5, '#8BB1A1', 'Visitors', 10); $g->line_hollow( 2, 4, '#BAA8BD', 'Friends', 10 );
$g->set_x_labels( array( 'Jan','Feb','Mar','Apr','May','Jun','Jul','Aug','Sep' ) ); $g->set_y_max( 20 );
// // // $g->set_inner_background( '#E3F0FD', '#CBD7E6', 90 ); // // // $g->x_axis_colour( '#8499A4', '#E4F5FC' ); $g->y_axis_colour( '#8499A4', '#E4F5FC' ); $g->bg_colour = '#E4F5FC';
$g->y_label_steps( 4 ); $g->set_y_legend( 'Open Flash Chart', 12, '0x736AFF' ); echo $g->render(); ?>
|
Help support the project:
|