Login   Register  
PHP Classes
elePHPant
Icontem

File: sample_scatter.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of Tom Schaefer  >  QOpenFlash  >  sample_scatter.php  >  Download  
File: sample_scatter.php
Role: Example script
Content type: text/plain
Description: Sample Scatter Chart
Class: QOpenFlash
Display charts using Open Flash
Author: By
Last change: renaming
Date: 2008-06-08 02:38
Size: 847 bytes
 

Contents

Class file image Download
<?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$a3'#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( -)
    ->
setYMax)
    ->
setXMin( -)
    ->
setXMax)    
    ->
setXOffset(false);
        
echo 
$g->render();
?>