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

Area charts. These are almost identical to line charts.

Method: area_hollow

area_hollow( $width, $dot_size, $alpha, $colour [, $text=''][, $font_size=''][, $fill_colour] )
For $with, $dot_size, $colour, $text and $font_size see data lines.

$alpha is how transparent the area is. 100 is opaque (solid) and 0 is transparent. 50 is 50% etc...

$fill_colour is an optional fill colour. If this is not specified then the $colour is used.

Area charts are used to show volumes of things, e.g. number of people who visited your web site.

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

// generate some random data

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

$i=0$i<6.2$i+=0.2 )
$tmp sin($i) * 1.9;

$data[] = $tmp;

// just show to two decimal places
  // in our labels:
$labels[] = number_format($tmp,2);

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

$g->set_data$data );

// width: 2px, dots: 3px, area alpha: 25% ...
$g->area_hollow2325'#CC3399' );

$g->set_x_labels$labels );

$g->set_y_min( -);

$g->set_y_legend'Open Flash Chart'12'#736AFF' );
To see the data produced : gallery-data-21.php, then 'view source'.
Help support the project: Support This Project