PHP Classes

File: sample_area.php

Recommend this page to a friend!
  Classes of Tom Schaefer   QOpenFlash   sample_area.php   Download  
File: sample_area.php
Role: Example script
Content type: text/plain
Description: Sample Area Chart
Class: QOpenFlash
Display charts using Open Flash
Author: By
Last change: renaming
Date: 16 years ago
Size: 753 bytes
 

Contents

Class file image Download
<?php

include_once 'QOpenFlash.class.php';
// generate some random data
$data = array();
$labels = array();

for(
$i=0; $i<16; $i++ ){
 
$data[] = $i*$i;
 
$labels[] = $i;
}

$g = new QChartOpenFlash();
$g ->setTitle( 'Area', '{font-size:20px; color: #ffffff; margin:10px; background-color: #d070ac; padding: 5px 15px 5px 15px;}' )
    ->
setBgColor('#FDFDFD')
    ->
setData($data)
    ->
setXLabels( $labels )
    ->
setAreaHollow(2, 3, '#C11B01', 'Squared', 12, '#8E560F')
    ->
setXLabelStyle( 10, '#000000', 0, 2 )
    ->
setXAxisColor( '#e0e0e0', '#ADB5C7' )
    ->
setYAxisColor( '#e0e0e0', '#ADB5C7' )
    ->
setYMin( 0 )
    ->
setYMax( 225 )
    ->
setYSteps( 15 )
    ->
setXAxisSteps( 2 )
    ->
setYLegend( 'Value', 12, '#736AFF' );
   
echo
$g->render();
?>