ofc_line_base.php 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. <?php
  2. class line_base
  3. {
  4. function line_base()
  5. {
  6. $this->type = "line_dot";
  7. $this->text = "Page views";
  8. $tmp = 'font-size';
  9. $this->$tmp = 10;
  10. $this->values = array(9,6,7,9,5,7,6,9,7);
  11. }
  12. function set_values( $v )
  13. {
  14. $this->values = $v;
  15. }
  16. function set_width( $width )
  17. {
  18. $this->width = $width;
  19. }
  20. function set_colour( $colour )
  21. {
  22. $this->colour = $colour;
  23. }
  24. function set_dot_size( $size )
  25. {
  26. $tmp = 'dot-size';
  27. $this->$tmp = $size;
  28. }
  29. function set_halo_size( $size )
  30. {
  31. $tmp = 'halo-size';
  32. $this->$tmp = $size;
  33. }
  34. function set_key( $text, $font_size )
  35. {
  36. $this->text = $text;
  37. $tmp = 'font-size';
  38. $this->$tmp = $font_size;
  39. }
  40. function set_tooltip( $tip )
  41. {
  42. $this->tip = $tip;
  43. }
  44. function set_on_click( $text )
  45. {
  46. $tmp = 'on-click';
  47. $this->$tmp = $text;
  48. }
  49. function loop()
  50. {
  51. $this->loop = true;
  52. }
  53. function line_style( $s )
  54. {
  55. $tmp = "line-style";
  56. $this->$tmp = $s;
  57. }
  58. }