Open Flash Chart
Support This Project :: Home - Gallery - Y Axis Off
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 - Y Axis Off


Method: set_y_label_style()

set_y_label_style( string $size[, string $colour=''] )
To turn off the Y Axis Labels, set the size to 'none', like:
$g->set_y_label_style( 'none' );


Create the flash object
<?php
include_once 'ofc-library/open_flash_chart_object.php';
open_flash_chart_object250100'http://'$_SERVER['SERVER_NAME'] .'/open-flash-chart/gallery-data-29.php' );
?>

gallery-data-29.php
<?php

// generate some random data
srand((double)microtime()*1000000);

$data = array();
for( 
$i=0$i<15$i++ )
{
  
$data[] = rand(1,9);
}

include_once( 
'ofc-library/open-flash-chart.php' );
$g = new graph();

$g->set_data$data );
$g->line_hollow23'#799191''Data'10 );

//
// we still need to scale the data:
//
$g->set_y_max10 );

//
// turn off the Y Axis labels:
//
$g->set_y_label_style'none' );
//
//
//

$g->bg_colour '#E0E0E0';
$g->set_inner_background'#DDEFFA''#CBD7E6'90 );

$g->x_axis_colour'#799191''#FFFFFF' );
$g->y_axis_colour'#799191''#FFFFFF' );

echo 
$g->render();
?>
To see the data produced : gallery-data-29.php, then 'view source'.
Help support the project: Support This Project

Adverts: