Line | |
---|
1 | <?php
|
---|
2 |
|
---|
3 | include_once 'ofc_bar_base.php';
|
---|
4 |
|
---|
5 | class bar_stack extends bar_base
|
---|
6 | {
|
---|
7 | function bar_stack()
|
---|
8 | {
|
---|
9 | $this->type = "bar_stack";
|
---|
10 | parent::bar_base();
|
---|
11 | }
|
---|
12 |
|
---|
13 | function append_stack( $v )
|
---|
14 | {
|
---|
15 | $this->append_value( $v );
|
---|
16 | }
|
---|
17 |
|
---|
18 | // an array of HEX colours strings
|
---|
19 | // e.g. array( '#ff0000', '#00ff00' );
|
---|
20 | function set_colours( $colours )
|
---|
21 | {
|
---|
22 | $this->colours = $colours;
|
---|
23 | }
|
---|
24 |
|
---|
25 | // an array of bar_stack_value
|
---|
26 | function set_keys( $keys )
|
---|
27 | {
|
---|
28 | $this->keys = $keys;
|
---|
29 | }
|
---|
30 | }
|
---|
31 |
|
---|
32 | class bar_stack_value
|
---|
33 | {
|
---|
34 | function bar_stack_value( $val, $colour )
|
---|
35 | {
|
---|
36 | $this->val = $val;
|
---|
37 | $this->colour = $colour;
|
---|
38 | }
|
---|
39 |
|
---|
40 | function set_tooltip( $tip )
|
---|
41 | {
|
---|
42 | $this->tip = $tip;
|
---|
43 | }
|
---|
44 | }
|
---|
45 |
|
---|
46 | class bar_stack_key
|
---|
47 | {
|
---|
48 | function bar_stack_key( $colour, $text, $font_size )
|
---|
49 | {
|
---|
50 | $this->colour = $colour;
|
---|
51 | $this->text = $text;
|
---|
52 | $tmp = 'font-size';
|
---|
53 | $this->$tmp = $font_size;
|
---|
54 | }
|
---|
55 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.