Location: PHPKode > scripts > QOpenFlash > sample_scatter.php
<?php

include_once 'QOpenFlash.class.php';

// generate some random data
$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 QChartOpenFlash();
$g	->setScatter( $a, 3, '#736AFF', 'My Dots', 12 )
	->setToolTip( 'x:#x_label#<br>y:#val#' )
	->setXLegend( '&#20013;&#25991;,&#20013;&#25991;&-%-"-£-+-=' )
	->setTitle( 'Scatter Chart', '{font-size:18px; color: #d01f3c;}' )
	->setBgColor('#ffffff')
	->setXLabelStyle(10, '#9933cc')
	->setYSteps(10)
	->setYMin( -5 )
	->setYMax( 5 )
	->setXMin( -5 )
	->setXMax( 5 )	
	->setXOffset(false);
		
echo $g->render();
?>
Return current item: QOpenFlash