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

Method: scatter

scatter( array $data, integer $line_width, string $colour[, string $text][, integer $size] )

The data array must be an array of point objects.

The point object:

point( integer $x, integer $y, integer $size_px )

Takes an x,y co-ordinate and the size of the circle in pixels.

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-41.php' );
?>
gallery-data-41.php
<?php
include_once( 'ofc-library/open-flash-chart.php' );

$a = array();
$labels = array();

$a[] = new point(-5,-5,10);
$a[] = new point(0,0,5);
$a[] = new point(0,1,15);
$a[] = new point(0,-1,15);
$a[] = new point(1,1,15);
$a[] = new point(2,2,4);
$a[] = new point(5,5,12);
$a[] = new point(5,-5,9);
$a[] = new point(-5,5,5);
$a[] = new point(0.5,1,15);
//
// ----
//
$g = new graph();
$g->title'Scatter Chart''{font-size: 26px;}' );

//
// LOOK:
//
$g->scatter$a3'#736AFF''My Dots'12 );
//
//
$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'中文,中文&-%-"-£-+-=' );

$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-41.php, then 'view source'.
Help support the project: Support This Project

Adverts: