Open Flash Chart
Support This Project :: Home - Gallery - null data
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 - null data

See data lines for the set_data() method.

Please note how the first two values and last two values are null and do not show in the graph. There are further null values that are skipped.

Create the flash object
<?php
include_once 'ofc-library/open_flash_chart_object.php';
open_flash_chart_object400250'http://'$_SERVER['SERVER_NAME'] .'/open-flash-chart/gallery-data-30.php' );
?>
gallery-data-30.php
<?php

include_once( 'ofc-library/open-flash-chart.php' );
$g = new graph();

$g->set_x_label_style10'#9933CC' );
$g->y_label_steps);
$g->area_hollow2325'#CC3399''Price'12 );

$g->set_y_min);
$g->set_y_max40000 );
$tmp = array();

$tmp[] = '2007-06-22';
$tmp[] = '2007-06-23';
$tmp[] = '2007-06-24';
$tmp[] = '2007-06-25';
$tmp[] = '2007-06-26';
$tmp[] = '2007-06-27';
$tmp[] = '2007-06-28';
$tmp[] = '2007-06-29';
$tmp[] = '2007-06-30';
$tmp[] = '2007-06-31';
$tmp[] = '2007-07-01';
$tmp[] = '2007-07-02';
$tmp[] = '2007-07-03';
$tmp[] = '2007-07-04';

$g->set_x_labels$tmp );

//
// now set up an array of values to
// show in the chart, this includes
// a number of null values which
// will NOT be plotted.
//
$data = array();
$data[] = 'null';
$data[] = 'null';
$data[] = '33188';
$data[] = '34019';
$data[] = '34692';
$data[] = 'null';
$data[] = 'null';
$data[] = 'null';
$data[] = '36319';
$data[] = 'null';
$data[] = 'null';
$data[] = '37089';
$data[] = 'null';
$data[] = 'null';

$g->set_data$data );

$g->bg_colour '#E0E0E0';
$g->set_inner_background'#DDEFFA''#CBD7E6'90 );

$g->x_axis_colour'#799191''#FFFFFF' );
$g->y_axis_colour'#799191''#FFFFFF' );

$g->set_x_label_style10'#CC3399');
$g->set_y_label_style10'#CC3399' );

$g->title'Avg. Property Value (showing null values)''{font-size: 14px; color: #CC3399}' );

$g->set_tool_tip'USD $#val#' );

echo 
$g->render();
?>
To see the data produced : gallery-data-30.php, then 'view source'.
Help support the project: Support This Project

Adverts: