Charts - Line Charts Menu - Advance Line Dot

Add different data to the graph.

Each dot gets its attributes from the line settings. For example, setting:

	$line_dot->set_dot_size( 3 );
actually sets each dots size attribute to 3. You can override these using dot_value( $value, $colour ) (search the PHP source code to see the methods avaible in this object)

This goes into the <head> of the page:

<script type="text/javascript" src="js/swfobject.js"></script>
<script type="text/javascript">
"open-flash-chart.swf", "my_chart", "550", "200",
"9.0.0", "expressInstall.swf",
{"data-file":"gallery/adv-line-dot.php"} );
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]


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

$data = array();
$i=0$i<8$i+=0.2 )
$val sin($i) + 1.5;
  // OK, lets do something interesting.
  // any value above 1.75 we will plot
  // in RED
if( $val 1.75 )
$d = new dot($val);
$data[] = $d->colour('#D02020')->tooltip('#val#<br>Your text here');
$data[] = $val;

$default_dot = new dot();
$default_dot->size(3)->colour('#DFC329')->tooltip'#x_label#:#val#' );

$line_dot = new line();
$line_dot->set_colour'#DFC329' );
$line_dot->set_values$data );

$y = new y_axis();

$chart = new open_flash_chart();
$chart->set_title( new title'Advanced dot lines' ) );
$chart->set_y_axis$y );
// here we add our data sets to the chart:
$chart->add_element$line_dot );

To see the data produced : gallery/adv-line-dot.php, then 'view source'.
Support This Project

Open Flash Chart logo by | Syntax highlights are by GeSHi