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

You can mix scatter charts with line charts. You can also plot points at any real position, e.g. at 0.5, 0.5

Adding lines in is a little clinky, but it works.

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

$a = array();
$b = array();
$c = array();

$a[] = new point(-0.5,-0.5,5);
$a[] = new point(0.5,0.5,5);
$a[] = new point(0,0,5);

$b[] = new point(-3,3,5);
$b[] = new point(0,3,5);
$b[] = new point(3,3,5);

$tmp = -4;
for( 
$i=-5$i<6$i++ )
{
    
$c[] = $tmp;
    
$tmp += 0.2;
}
//
// ----
//
$g = new graph();
$g->title'Mixed Scatter and Line''{font-size: 23px;}' );

//
// LOOK:
//
$g->scatter$a3'#736AFF''Dot A'12 );
$g->scatter$b3'#6AFF73''Dot B'12 );

$g->set_data$c ); 
$g->line_hollow24'0x80a033''Line'10 );
//
//
$g->set_tool_tip'x:#x_label#<br>y:#val#' );
//
//

$g->set_x_offsetfalse );

$g->set_y_label_style10'#9933CC' );
$g->y_label_steps(10);

$g->set_x_label_style10'#9933CC' );

$g->set_x_legend'I is, like, mixin it up.' );

$g->set_y_min( -);
$g->set_y_max);
$g->set_x_min( -);
$g->set_x_max);

echo 
$g->render();
?>
To see the data produced : gallery-data-50.php, then 'view source'.
Help support the project: Support This Project

Adverts: