minor bug fix
[openemr.git] / library / openflashchart / php-ofc-library / ofc_hbar.php
blob6f8c0e451fe2252691c600e3946e560347c39afd
1 <?php
3 class hbar_value
5 function hbar_value( $left, $right=null )
7 if( isset( $right ) )
9 $this->left = $left;
10 $this->right = $right;
12 else
13 $this->right = $left;
16 function set_colour( $colour )
18 $this->colour = $colour;
21 function set_tooltip( $tip )
23 $this->tip = $tip;
27 class hbar
29 function hbar( $colour )
31 $this->type = "hbar";
32 $this->values = array();
33 $this->set_colour( $colour );
36 function append_value( $v )
38 $this->values[] = $v;
41 function set_values( $v )
43 foreach( $v as $val )
44 $this->append_value( new hbar_value( $val ) );
47 function set_colour( $colour )
49 $this->colour = $colour;
52 function set_key( $text, $size )
54 $this->text = $text;
55 $tmp = 'font-size';
56 $this->$tmp = $size;
59 function set_tooltip( $tip )
61 $this->tip = $tip;