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:
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_object ( 500 , 300 , '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 ( $a , 60 , 2 , '#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_style ( 10 , '#000000' , 0 , 1 ); $g -> set_x_legend ( 'Week 1' , 12 , '#C11B01' ); $g -> set_y_min ( 0 ); $g -> set_y_max ( 70 ); $g -> y_label_steps ( 10 ); $g -> set_y_legend ( 'Value' , 12 , '#C11B01' ); echo $g -> render (); ?>
Help support the project:
Adverts: