Warning this is an old version.

Take me to the latest version

Gallery - Glass Bar Chart

Make a glass bar chart.

Object: bar()

This goes into the <head> of the page:

<script type="text/javascript" src="js/swfobject.js"></script>
<script type="text/javascript">

swfobject.embedSWF(
"open-flash-chart.swf", "my_chart",
"550", "200", "9.0.0", "expressInstall.swf",
{"data-file":"gallery/3d-bar-chart.php"} );

</script>
This writes the chart into a div with id="my_chart", right click and view source to see it in action, [the tutorials have more details]

gallery/3d-bar-chart.php
<?php

srand
((double)microtime()*1000000);
$data = array();

// add random height bars:
for( $i=0$i<10$i++ )
  
$data[] = rand(2,9);
  
include 
'../php-ofc-library/open-flash-chart.php';

$title = new titledate("D M d Y") );

$bar = new bar_3d();
$bar->set_values$data );
$bar->colour '#D54C78';

$x_axis = new x_axis();
$x_axis->set_3d);
$x_axis->colour '#909090';
$x_axis->set_labels( array(1,2,3,4,5,6,7,8,9,10) );

$chart = new open_flash_chart();
$chart->set_title$title );
$chart->add_element$bar );
$chart->set_x_axis$x_axis );

echo 
$chart->toPrettyString();

To see the data produced : gallery/3d-bar-chart.php, then 'view source'.
Support This Project
Adverts:


Open Flash Chart logo by numb.me.uk. | Syntax highlights are by GeSHi