PHP Classes

File: sample_scatter.php

Recommend this page to a friend!
  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: 16 years ago
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( $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();
?>