- Timestamp:
- 2013/08/24 23:33:52 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/version-2_13-dev/data/class/graph/SC_Graph_Line.php
r22567 r23124 25 25 class SC_Graph_Line extends SC_Graph_Base_Ex 26 26 { 27 var$area_width;28 var$area_height;29 var$ygrid_on;30 var$graph_max; // グラフのエリア最大値(Y軸頂点の値)31 var$arrXLabel;32 var$XLabelAngle; // X軸ラベル角度33 var$XTitle; // X軸タイトル34 var$YTitle; // Y軸タイトル35 var$arrDataList; // グラフデータを格納36 var$arrPointList; // 折れ線座標を格納37 var$line_max; // 複数の描画の場合に加算していく38 39 var$x_margin;40 var$y_margin;27 public $area_width; 28 public $area_height; 29 public $ygrid_on; 30 public $graph_max; // グラフのエリア最大値(Y軸頂点の値) 31 public $arrXLabel; 32 public $XLabelAngle; // X軸ラベル角度 33 public $XTitle; // X軸タイトル 34 public $YTitle; // Y軸タイトル 35 public $arrDataList; // グラフデータを格納 36 public $arrPointList; // 折れ線座標を格納 37 public $line_max; // 複数の描画の場合に加算していく 38 39 public $x_margin; 40 public $y_margin; 41 41 42 42 // コンストラクタ 43 function __construct(43 public function __construct( 44 44 $bgw = BG_WIDTH, $bgh = BG_HEIGHT, $left = LINE_LEFT, $top = LINE_TOP, 45 45 $area_width = LINE_AREA_WIDTH, $area_height = LINE_AREA_HEIGHT) { … … 56 56 57 57 // X軸ラベルの角度セット 58 function setXLabelAngle($Angle)58 public function setXLabelAngle($Angle) 59 59 { 60 60 $this->XLabelAngle = $Angle; … … 62 62 63 63 // Y軸タイトル 64 function drawYTitle()64 public function drawYTitle() 65 65 { 66 66 // Y軸にタイトルを入れる … … 74 74 75 75 // X軸タイトル 76 function drawXTitle()76 public function drawXTitle() 77 77 { 78 78 // Y軸にタイトルを入れる … … 86 86 87 87 // Y軸の描画 88 function drawYLine()88 public function drawYLine() 89 89 { 90 90 imageline($this->image, $this->left, $this->top, $this->left, $this->top + $this->area_height, $this->flame_color); … … 112 112 113 113 // X軸の描画 114 function drawXLine($bar = false)114 public function drawXLine($bar = false) 115 115 { 116 116 imageline($this->image, $this->left, $this->top + $this->area_height, $this->left + $this->area_width, $this->top + $this->area_height, $this->flame_color); … … 156 156 157 157 // グリッド表示 158 function setYGridOn($ygrid_on)158 public function setYGridOn($ygrid_on) 159 159 { 160 160 $this->ygrid_on = $ygrid_on; … … 162 162 163 163 // ポイントの描画 164 function setMark($line_no, $left, $top, $size = LINE_MARK_SIZE)164 public function setMark($line_no, $left, $top, $size = LINE_MARK_SIZE) 165 165 { 166 166 // 偶数に変換しておく … … 178 178 179 179 // Y軸目盛りに値を入れる 180 function setYScale()180 public function setYScale() 181 181 { 182 182 // 1目盛りの値 … … 195 195 196 196 // 197 function setMax($arrData)197 public function setMax($arrData) 198 198 { 199 199 // データの最大値を取得する。 … … 212 212 213 213 // グラフの描画 214 function drawGraph()214 public function drawGraph() 215 215 { 216 216 // グラフ背景を描画 … … 238 238 239 239 // ラインを描画する 240 function drawLine($line_no)240 public function drawLine($line_no) 241 241 { 242 242 $arrPointList = $this->arrPointList[$line_no]; … … 255 255 256 256 // マークを描画する 257 function drawMark($line_no)257 public function drawMark($line_no) 258 258 { 259 259 $arrPointList = $this->arrPointList[$line_no]; … … 267 267 268 268 // ラベルを描画する 269 function drawLabel($line_no)269 public function drawLabel($line_no) 270 270 { 271 271 $arrData = $this->arrDataList[$line_no]; … … 283 283 284 284 // データをセットする 285 function setData($arrData)286 { 287 $this->arrDataList[$this->line_max] = array_values((array) $arrData);285 public function setData($arrData) 286 { 287 $this->arrDataList[$this->line_max] = array_values((array) $arrData); 288 288 $this->setMax($this->arrDataList[$this->line_max]); 289 289 // 値の描画変換率 … … 305 305 306 306 // X軸ラベルをセットする 307 function setXLabel($arrXLabel)308 { 309 $this->arrXLabel = array_values((array) $arrXLabel);307 public function setXLabel($arrXLabel) 308 { 309 $this->arrXLabel = array_values((array) $arrXLabel); 310 310 } 311 311 312 312 // X軸タイトルをセットする 313 function setXTitle($title)313 public function setXTitle($title) 314 314 { 315 315 $this->XTitle = $title; … … 317 317 318 318 // Y軸タイトルをセットする 319 function setYTitle($title)319 public function setYTitle($title) 320 320 { 321 321 $this->YTitle = $title;
Note: See TracChangeset
for help on using the changeset viewer.