00001 <?php 00002 /*************************************************************************** 00003 * Copyright (C) 2009 by Denis M. Gabaidulin * 00004 * * 00005 * This program is free software; you can redistribute it and/or modify * 00006 * it under the terms of the GNU Lesser General Public License as * 00007 * published by the Free Software Foundation; either version 3 of the * 00008 * License, or (at your option) any later version. * 00009 * * 00010 ***************************************************************************/ 00011 00015 final class GoogleChartGrid extends BaseGoogleChartParameter 00016 { 00017 protected $name = 'chg'; 00018 00019 private $horizontalStepSize = 0; 00020 private $verticalStepSize = 0; 00021 private $lineSegmentLength = 0; 00022 00026 public static function create() 00027 { 00028 return new self; 00029 } 00030 00034 public function setHorizontalStepSize($size) 00035 { 00036 $this->horizontalStepSize = $size; 00037 00038 return $this; 00039 } 00040 00041 public function getHorizontalStepSize() 00042 { 00043 return $this->horizontalStepSize; 00044 } 00045 00049 public function setVerticalStepSize($size) 00050 { 00051 $this->verticalStepSize = $size; 00052 00053 return $this; 00054 } 00055 00056 public function getVerticalStepSize() 00057 { 00058 return $this->verticalStepSize; 00059 } 00060 00064 public function setLineSegmentLength($length) 00065 { 00066 $this->lineSegmentLength = $length; 00067 00068 return $this; 00069 } 00070 00071 public function getLineSegmentLength() 00072 { 00073 return $this->lineSegmentLength; 00074 } 00075 00076 public function toString() 00077 { 00078 return 00079 $this->name 00080 .'=' 00081 .$this->horizontalStepSize 00082 .',' 00083 .$this->verticalStepSize 00084 .',' 00085 .$this->lineSegmentLength; 00086 } 00087 } 00088 ?>