- Timestamp:
- 2007/07/20 15:58:59 (17 years ago)
- Location:
- branches/feature-module-update
- Files:
-
- 1 edited
- 2 copied
Legend:
- Unmodified
- Added
- Removed
-
branches/feature-module-update
-
Property
svn:ignore
set to
.cache
.settings
.projectOptions
-
Property
svn:ignore
set to
-
branches/feature-module-update/html/admin/total/class/SC_GraphBar.php
r12157 r15078 8 8 require_once($SC_GRAPHBAR_DIR . "/SC_GraphLine.php"); 9 9 10 // ËÀ¥°¥é¥ÕÀ¸À®¥¯¥é¥¹10 // 棒グラフ生成クラス 11 11 class SC_GraphBar extends SC_GraphLine{ 12 // ¥³¥ó¥¹¥È¥é¥¯¥¿12 // コンストラクタ 13 13 function SC_GraphLine( 14 14 $bgw = BG_WIDTH, $bgh = BG_HEIGHT, $left = LINE_LEFT, $top = LINE_TOP, … … 17 17 } 18 18 19 // ¥°¥é¥Õ¤ÎÉÁ²è19 // グラフの描画 20 20 function drawGraph() { 21 21 $this->drawYLine(); 22 22 $this->drawXLine(true); 23 23 24 // ËÀ¥°¥é¥Õ¤ÎÉÁ²è24 // 棒グラフの描画 25 25 for($i = 0; $i < $this->line_max; $i++) { 26 26 $this->drawBar($i); 27 27 } 28 28 29 // ¥é¥Ù¥ë¤ÎÉÁ²è29 // ラベルの描画 30 30 for($i = 0; $i < $this->line_max; $i++) { 31 31 $this->drawLabel($i); 32 32 } 33 33 34 // ËÞÎã¤ÎÉÁ²è34 // 凡例の描画 35 35 $this->drawLegend(); 36 36 } 37 37 38 // ËÀ¥°¥é¥Õ¤ÎÉÁ²è38 // 棒グラフの描画 39 39 function drawBar($line_no) { 40 40 $arrPointList = $this->arrPointList[$line_no]; 41 // ¥Ç¡¼¥¿¿ô¤ò¿ô¤¨¤ë41 // データ数を数える 42 42 $count = count($arrPointList); 43 // ȾÌÜÀ¹¤ê¤ÎÉý¤òµá¤á¤ë43 // 半目盛りの幅を求める 44 44 $half_scale = intval($this->area_width / ($count + 1) / 2); 45 // ÌÜÀ¹¤ê¤ÎÉý¤òµá¤á¤ë45 // 目盛りの幅を求める 46 46 $scale_width = intval($this->area_width / ($count + 1)); 47 // ËÀ¥°¥é¥Õ¤Î¥µ¥¤¥º¤òµá¤á¤ë47 // 棒グラフのサイズを求める 48 48 $bar_width = intval(($scale_width - (BAR_PAD * 2)) / $this->line_max); 49 // ¿§¿ô¤Î¼èÆÀ49 // 色数の取得 50 50 $c_max = count($this->arrColor); 51 51 for($i = 0; $i < $count; $i++) { … … 55 55 $bottom = $this->top + $this->area_height; 56 56 57 // ±Æ¤ÎÉÁ²è57 // 影の描画 58 58 if($this->shade_on) { 59 59 imagefilledrectangle($this->image, $left + 2, $top + 2, $right + 2, $bottom, $this->shade_color); … … 65 65 } 66 66 67 // ¥é¥Ù¥ë¤òÉÁ²è¤¹¤ë67 // ラベルを描画する 68 68 function drawLabel($line_no) { 69 69 $arrData = $this->arrDataList[$line_no];
Note: See TracChangeset
for help on using the changeset viewer.