ofc_y_axis_labels.php 800 B

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