Open Flash Chart
Support This Project :: Home - Gallery - Area 2
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 - Area 2

See area for details on the methods used in this example.

This example shows an area chart with the area filled with a different colour.

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

$data 
= array();
$labels = array();

for( 
$i=0$i<16$i++ )
{
  
$data[] = $i*$i;
  
$labels[] = $i;
}


include_once( 
'ofc-library/open-flash-chart.php' );
$g = new graph();
$g->title'Area Chart 2''{font-size: 26px;}' );

$g->set_data$data );

//
// LOOK:
//
// width: 2px, dots: 3px, area alpha: 25% ...
$g->area_hollow2325'#C11B01''Squared'12'#8E560F' );
//
//

$g->set_x_labels$labels );
$g->set_x_label_style10'#000000'0);
$g->set_x_axis_steps);
$g->set_x_legend'X squared'12'#C11B01' );

$g->set_y_min);
$g->set_y_max225 );

$g->y_label_steps15 );
$g->set_y_legend'Value'12'#C11B01' );
echo 
$g->render();
?>
To see the data produced : gallery-data-38.php, then 'view source'.
Help support the project: Support This Project

Adverts: