- Timestamp:
- 2013/02/18 19:09:54 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/version-2_12-dev/data/class/graph/SC_Graph_Pie.php
r22206 r22567 23 23 24 24 // 円グラフ生成クラス 25 class SC_Graph_Pie extends SC_Graph_Base_Ex{ 25 class SC_Graph_Pie extends SC_Graph_Base_Ex 26 { 26 27 var $cw; 27 28 var $ch; … … 33 34 34 35 // コンストラクタ 35 function __construct($bgw = BG_WIDTH, $bgh = BG_HEIGHT, $left = PIE_LEFT, $top = PIE_TOP) { 36 function __construct($bgw = BG_WIDTH, $bgh = BG_HEIGHT, $left = PIE_LEFT, $top = PIE_TOP) 37 { 36 38 parent::__construct($bgw, $bgh, $left, $top); 37 39 // サイズ設定 … … 42 44 43 45 // データを360°値に変換する 44 function getCircleData($array) { 46 function getCircleData($array) 47 { 45 48 $total = ''; 46 49 $new_total = ''; … … 73 76 74 77 // 円の位置設定を行う 75 function setPosition($cx, $cy) { 78 function setPosition($cx, $cy) 79 { 76 80 $this->cx = $cx; 77 81 $this->cy = $cy; … … 79 83 80 84 // 円のサイズ設定を行う 81 function setSize($cw, $ch, $cz = 0) { 85 function setSize($cw, $ch, $cz = 0) 86 { 82 87 $this->cw = $cw; 83 88 $this->ch = $ch; … … 86 91 87 92 // 影の描画 88 function drawShade() { 93 function drawShade() 94 { 89 95 $move = 1; 90 96 for ($i = ($this->cy + $this->cz); $i <= ($this->cy + $this->cz + ($this->cz * PIE_SHADE_IMPACT)); $i++) { … … 95 101 96 102 // データをセットする 97 function setData($arrData) { 103 function setData($arrData) 104 { 98 105 $this->arrData = array_values($arrData); 99 106 } 100 107 101 108 // 円グラフを描画する 102 function drawGraph() { 109 function drawGraph() 110 { 103 111 $x = $this->cx; 104 112 $y = $this->cy; … … 198 206 199 207 // 円グラフのラベルを描画する 200 function drawLabel($arrRad) { 208 function drawLabel($arrRad) 209 { 201 210 $rd_max = count($arrRad); 202 211 $start = 0;
Note: See TracChangeset
for help on using the changeset viewer.
