Line | |
---|
1 | <?php
|
---|
2 |
|
---|
3 | class y_axis_labels
|
---|
4 | {
|
---|
5 | function y_axis_labels(){}
|
---|
6 |
|
---|
7 | /**
|
---|
8 | * @param $steps which labels are generated
|
---|
9 | */
|
---|
10 | function set_steps( $steps )
|
---|
11 | {
|
---|
12 | $this->steps = $steps;
|
---|
13 | }
|
---|
14 |
|
---|
15 | /**
|
---|
16 | *
|
---|
17 | * @param $labels as an array of [y_axis_label or string]
|
---|
18 | */
|
---|
19 | function set_labels( $labels )
|
---|
20 | {
|
---|
21 | $this->labels = $labels;
|
---|
22 | }
|
---|
23 |
|
---|
24 | function set_colour( $colour )
|
---|
25 | {
|
---|
26 | $this->colour = $colour;
|
---|
27 | }
|
---|
28 |
|
---|
29 | /**
|
---|
30 | * font size in pixels
|
---|
31 | */
|
---|
32 | function set_size( $size )
|
---|
33 | {
|
---|
34 | $this->size = $size;
|
---|
35 | }
|
---|
36 |
|
---|
37 | /**
|
---|
38 | * rotate labels
|
---|
39 | */
|
---|
40 | function set_vertical()
|
---|
41 | {
|
---|
42 | $this->rotate = 270;
|
---|
43 | }
|
---|
44 |
|
---|
45 | function rotate( $angle )
|
---|
46 | {
|
---|
47 | $this->rotate = $angle;
|
---|
48 | }
|
---|
49 |
|
---|
50 | /**
|
---|
51 | * @param $text default text that all labels inherit
|
---|
52 | */
|
---|
53 | function set_text( $text )
|
---|
54 | {
|
---|
55 | $this->text = $text;
|
---|
56 | }
|
---|
57 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.