Warning this is an old version.

Take me to the latest version

Chart Elements - X Axis Menu - X Axis

Turn the X Axis offset off. This works for all charts types, scatter, line and bar.

Documentation: x_axis

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/x-axis-offset.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/x-axis-offset.php
<?php

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

$chart = new open_flash_chart();

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

$line_dot = new line();
$line_dot->set_values( array(5,6,5,6,5,6,5,6,5) );

$chart->set_title$title );
$chart->add_element$line_dot );

//
// create an X Axis object
//
$x = new x_axis();
$x->offset(false)->steps(4);

//
// Add the X Axis object to the chart:
//
$chart->set_x_axis$x );

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


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