y_axis_base Class Reference
Inherited by
y_axis, and
y_axis_right.
Member Function Documentation
| range |
( |
$ |
min, |
|
|
$ |
max, |
|
|
$ |
steps = 1 | |
|
) |
| | |
| set_colours |
( |
$ |
colour, |
|
|
$ |
grid_colour | |
|
) |
| | |
| set_grid_colour |
( |
$ |
colour |
) |
|
| set_label_text |
( |
$ |
text |
) |
|
Pass in some text for each label. This can contain magic variables "#val#" which will get replaced with the value for that Y axis label. Useful for:
- "£#val#"
- "#val#%"
- "#val# million"
- Parameters:
-
- Parameters:
-
| $labels | as an array of string values. |
By default the Y axis will show from min to max, but you can override this by passing in your own labels. Remember the Y axis min is at the bottom, so the labels will go from bottom to top.
- Parameters:
-
| $off | as Boolean. If true the Y axis is nudged up half a step. |
| set_range |
( |
$ |
min, |
|
|
$ |
max, |
|
|
$ |
steps = 1 | |
|
) |
| | |
Set min and max values, also (optionally) set the steps value. You can reverse the chart by setting min larger than max, e.g. min = 10 and max = 0.
- Parameters:
-
| $min | as integer |
| $max | as integer |
| $steps | as integer. |
- Parameters:
-
Only show every $steps label, e.g. every 10th
- Parameters:
-
| $s | as integer, thickness of the Y axis line |
| set_tick_length |
( |
$ |
val |
) |
|
- Parameters:
-
| $val | as integer. The length of the ticks in pixels |
Make the labels show vertical
The documentation for this class was generated from the following file: