Open Flash Chart
Support This Project :: Home - Gallery - High Low Close
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 - High Low Close

Method: hlc

hlc( array $data, integer $alpha, integer $line_width, string $colour, [, string $text] [, integer $size] )

The data array must be an array of hlc objects.

The hlc object:

hlc( integer $high, integer $low, integer $close )

The hlc object take four parameters, high, low and close.

Note:
The hlc adds extra magic options to the tooltip string:

  • #high#
  • #low#
  • #close#
I assume you can figure out what those magic values get replaced with :-)

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

$a = array();
$labels = array();

$a[] = new hlc(48,40,42);
$labels[] = 'Mon';
$a[] = new hlc(30,28,28);
$labels[] = 'Tue';
$a[] = new hlc(20,10,15);
$labels[] = 'Wed';
$a[] = new hlc(50,30,35);
$labels[] = 'Thu';
$a[] = new hlc(58,30,50);
$labels[] = 'Fri';
$a[] = new hlc(62,33,45);
$labels[] = 'Sat';
$a[] = new hlc(30,20,25);
$labels[] = 'Sun';
//
// ----
//
$g = new graph();
$g->title'candle''{font-size: 26px;}' );

//
// LOOK:
//
$g->hlc$a602'#F50505''My Company'12 );
//
//
$g->set_tool_tip'#x_label#<br>Close: #close#<br>High: #high#<br>Low: #low#' );
//
//

$g->set_x_labels$labels );
$g->set_x_label_style10'#000000'0);
$g->set_x_legend'Week 1'12'#C11B01' );

$g->set_y_min);
$g->set_y_max70 );

$g->y_label_steps10 );
$g->set_y_legend'Value'12'#C11B01' );
echo 
$g->render();
?>
To see the data produced : gallery-data-40.php, then 'view source'.
Help support the project: Support This Project

Adverts: