Warning this is an old version.

Take me to the latest version

Chart Elements - Y Axis Menu - Reverse Y Axis

The Y Axis has been reversed, -10 is at the top.

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", "400", "9.0.0", "expressInstall.swf",
{"data-file":"gallery/y-axis-2.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/y-axis-2.php
<?php

include '../php-ofc-library/open-flash-chart.php';

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

$line_dot = new line();
$line_dot->set_values( array(-2,4,-5,3,10,-10) );

$chart = new open_flash_chart();
$chart->set_title$title );
$chart->add_element$line_dot );

//
// create a Y Axis object
//
$y = new y_axis();
$y->set_stroke);
$y->set_colour'#000000' );
$y->set_tick_length);
$y->set_grid_colour'#A2ACBA' );
$y->set_range10, -10);

//
// Add the Y Axis object to the chart:
//
$chart->set_y_axis$y );

echo 
$chart->toPrettyString();
To see the data produced : gallery/y-axis-2.php, then 'view source'.
Support This Project
Adverts:


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