Changeset 21514 for branches/version-2_12-dev/data/class/graph
- Timestamp:
- 2012/02/15 19:56:17 (14 years ago)
- Location:
- branches/version-2_12-dev/data/class/graph
- Files:
-
- 3 edited
-
SC_Graph_Base.php (modified) (7 diffs)
-
SC_Graph_Line.php (modified) (2 diffs)
-
SC_Graph_Pie.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/version-2_12-dev/data/class/graph/SC_Graph_Base.php
r21490 r21514 23 23 24 24 /** TTFフォントファイル */ 25 define('FONT_REALFILE', DATA_REALDIR . "fonts/wlmaru20044.ttf");25 define('FONT_REALFILE', DATA_REALDIR . 'fonts/wlmaru20044.ttf'); 26 26 27 27 /** フォントサイズ */ … … 240 240 241 241 // 画像を出力する 242 function outputGraph($header = true, $filename = "") {242 function outputGraph($header = true, $filename = '') { 243 243 if ($header) { 244 244 header('Content-type: image/png'); 245 245 } 246 246 247 if ($filename != "") {247 if ($filename != '') { 248 248 imagepng($this->image, $filename); 249 249 } else { … … 290 290 * 291 291 */ 292 $text = mb_convert_encoding($text, "EUC-JP", CHAR_CODE);292 $text = mb_convert_encoding($text, 'EUC-JP', CHAR_CODE); 293 293 //$text = mb_convert_encoding($text, CHAR_CODE); 294 294 if ($color != NULL) { … … 310 310 // ログを出力する 311 311 function debugPrint($text) { 312 $text = mb_convert_encoding($text, "UTF-8", CHAR_CODE);312 $text = mb_convert_encoding($text, 'UTF-8', CHAR_CODE); 313 313 if (!isset($this->text_top)) { 314 314 $this->text_top = FONT_SIZE + LINE_PAD; … … 320 320 321 321 // カラーラベルを描画 322 function drawLegend($legend_max = "", $clabelbg = true) {322 function drawLegend($legend_max = '', $clabelbg = true) { 323 323 // 凡例が登録されていなければ中止 324 324 if (count($this->arrLegend) <= 0) { … … 326 326 } 327 327 328 if ($legend_max != "") {328 if ($legend_max != '') { 329 329 $label_max = $legend_max; 330 330 } else { … … 450 450 function lfImageText($dst_image, $text, $font_size, $left, $top, $font, $arrRGB) { 451 451 $color = ImageColorAllocate($dst_image, $arrRGB[0], $arrRGB[1], $arrRGB[2]); 452 $text = mb_convert_encoding($text, "UTF-8", CHAR_CODE);452 $text = mb_convert_encoding($text, 'UTF-8', CHAR_CODE); 453 453 // 表示角度 454 454 $angle = 0; -
branches/version-2_12-dev/data/class/graph/SC_Graph_Line.php
r21490 r21514 62 62 function drawYTitle() { 63 63 // Y軸にタイトルを入れる 64 if ($this->YTitle != "") {64 if ($this->YTitle != '') { 65 65 $text_width = $this->getTextWidth($this->YTitle, FONT_SIZE); 66 66 $x_pos = $this->left - ($text_width / 2); … … 73 73 function drawXTitle() { 74 74 // Y軸にタイトルを入れる 75 if ($this->XTitle != "") {75 if ($this->XTitle != '') { 76 76 $text_width = $this->getTextWidth($this->XTitle, FONT_SIZE); 77 77 $x_pos = $this->left + $this->area_width - ($text_width / 2) + 30; -
branches/version-2_12-dev/data/class/graph/SC_Graph_Pie.php
r21490 r21514 43 43 // データを360°値に変換する 44 44 function getCircleData($array) { 45 $total = "";46 $new_total = "";45 $total = ''; 46 $new_total = ''; 47 47 if (!is_array($array)) { 48 48 return; … … 64 64 $arrRet[] = $ret; 65 65 // パーセント表示用 66 $this->arrLabel[] = round($val * $p_rate) . " %";66 $this->arrLabel[] = round($val * $p_rate) . ' %'; 67 67 $cnt++; 68 68 }
Note: See TracChangeset
for help on using the changeset viewer.
