<?
# 그래프 출력을 위한 데이터의 최대값및 최소값 세팅
$maxVal = 50; // 최대값 5백만
$step = 5; // 단위 5십만
$arrVal = array(25,18, 34, 46, 10, 29, 17, 38, 26, 25, 27, 39, 44, 22, 16, 43, 39, 22, 44, 18, 14, 22, 32, 45);
function showStickGraph($maxVal, $minVal, $step, $arrVal)
{
$bottomCommentHeight= 30; // 하단 설명공간 높이 픽셀값
$cntY = round($maxVal / $step); // y축 눈금개수
$unitHight = 30; // 단위 높이 픽셀값
$minVal = 0; // 최소값
$k= 10;
?>
<table cellpadding=0 cellspacing=0 border="1" >
<tr>
<!-- y축-->
<td >
<table cellpadding=0 cellspacing=0 border="1" >
<? for ($a= $maxVal; $a >= $minVal; $a -= $step){ ?>
<tr>
<td height="<?=$unitHight?>" valign="bottom" align="right">
<font size="2"><?=$a?></font>
</td>
</tr>
<?}?>
<tr>
<td height="<?=$bottomCommentHeight?>">
<font size="2">매출<br>(단위:10만)</font></td>
</tr>
</table>
</td>
<!--x축-->
<td valign="bottom">
<table cellpadding=0 cellspacing=0 border="0" >
<tr>
<? for ($i= 0; $i < 24; $i++){ ?>
<td align="center" valign="bottom">
<table cellpadding=0 cellspacing=0 border="1" >
<tr>
<td width="20" height="<?=($arrVal[$i])/$step * $unitHight ?>" bgcolor="green" valign="top" align="center">
<font size="2" color="white"><b><?=$arrVal[$i]?></b></font></td>
</tr>
<tr>
<td height="<?=$bottomCommentHeight?>" valigh="top"><font size="2"><?=($i<10)?"0$i":$i?></font></td>
</tr>
</table>
</td>
<?}?>
</tr>
</table>
</td>
</tr>
</table>
<?
}
showStickGraph($maxVal, $minVal, $step, $arrVal);
?>
게시판 목록
프로그램
| 번호 | 제목 | 글쓴이 | 날짜 | 조회 |
|---|---|---|---|---|
| 8230 | 9년 전 | 113 | ||
| 8229 | 9년 전 | 107 | ||
| 8228 |
커네드커네드
|
9년 전 | 154 | |
| 8227 | 9년 전 | 186 | ||
| 8226 | 9년 전 | 206 | ||
| 8225 | 9년 전 | 187 | ||
| 8224 | 9년 전 | 181 | ||
| 8223 | 9년 전 | 158 | ||
| 8222 |
|
9년 전 | 237 | |
| 8221 | 9년 전 | 140 | ||
| 8220 | 9년 전 | 170 | ||
| 8219 | 9년 전 | 132 | ||
| 8218 | 9년 전 | 187 | ||
| 8217 |
star3840
|
9년 전 | 156 | |
| 8216 | 9년 전 | 219 | ||
| 8215 | 9년 전 | 171 | ||
| 8214 | 9년 전 | 265 | ||
| 8213 | 9년 전 | 221 | ||
| 8212 | 9년 전 | 138 | ||
| 8211 | 9년 전 | 304 | ||
| 8210 | 9년 전 | 313 | ||
| 8209 | 9년 전 | 380 | ||
| 8208 | 9년 전 | 280 | ||
| 8207 | 9년 전 | 274 | ||
| 8206 |
|
9년 전 | 236 | |
| 8205 | 9년 전 | 219 | ||
| 8204 | 9년 전 | 190 | ||
| 8203 | 9년 전 | 270 | ||
| 8202 | 9년 전 | 187 | ||
| 8201 | 9년 전 | 228 | ||
| 8200 | 9년 전 | 226 | ||
| 8199 | 9년 전 | 252 | ||
| 8198 | 9년 전 | 218 | ||
| 8197 | 9년 전 | 210 | ||
| 8196 | 9년 전 | 601 | ||
| 8195 | 9년 전 | 210 | ||
| 8194 | 9년 전 | 327 | ||
| 8193 | 9년 전 | 215 | ||
| 8192 | 9년 전 | 248 | ||
| 8191 | 9년 전 | 195 | ||
| 8190 | 9년 전 | 194 | ||
| 8189 | 9년 전 | 246 | ||
| 8188 | 9년 전 | 186 | ||
| 8187 | 9년 전 | 188 | ||
| 8186 | 9년 전 | 193 | ||
| 8185 | 9년 전 | 365 | ||
| 8184 | 9년 전 | 147 | ||
| 8183 | 9년 전 | 368 | ||
| 8182 | 9년 전 | 218 | ||
| 8181 | 9년 전 | 181 | ||
| 8180 | 9년 전 | 755 | ||
| 8179 | 9년 전 | 528 | ||
| 8178 | 9년 전 | 376 | ||
| 8177 |
kiplayer
|
9년 전 | 382 | |
| 8176 | 9년 전 | 411 | ||
| 8175 | 9년 전 | 284 | ||
| 8174 | 9년 전 | 292 | ||
| 8173 | 9년 전 | 382 | ||
| 8172 | 9년 전 | 249 | ||
| 8171 | 9년 전 | 227 | ||
| 8170 | 9년 전 | 341 | ||
| 8169 |
커네드커네드
|
9년 전 | 302 | |
| 8168 | 9년 전 | 369 | ||
| 8167 | 9년 전 | 369 | ||
| 8166 | 9년 전 | 278 | ||
| 8165 | 9년 전 | 216 | ||
| 8164 | 9년 전 | 355 | ||
| 8163 | 9년 전 | 341 | ||
| 8162 | 9년 전 | 351 | ||
| 8161 | 9년 전 | 364 | ||
| 8160 |
|
9년 전 | 554 | |
| 8159 | 9년 전 | 491 | ||
| 8158 | 9년 전 | 304 | ||
| 8157 | 9년 전 | 425 | ||
| 8156 | 9년 전 | 305 | ||
| 8155 | 9년 전 | 299 | ||
| 8154 |
00년생용띠
|
9년 전 | 642 | |
| 8153 | 9년 전 | 282 | ||
| 8152 |
|
9년 전 | 460 | |
| 8151 | 9년 전 | 456 | ||
| 8150 | 9년 전 | 562 | ||
| 8149 |
Jangfolk
|
9년 전 | 409 | |
| 8148 | 9년 전 | 228 | ||
| 8147 | 9년 전 | 428 | ||
| 8146 | 9년 전 | 501 | ||
| 8145 | 9년 전 | 450 | ||
| 8144 | 9년 전 | 416 | ||
| 8143 | 9년 전 | 249 | ||
| 8142 | 9년 전 | 476 | ||
| 8141 | 9년 전 | 424 | ||
| 8140 | 9년 전 | 973 | ||
| 8139 | 9년 전 | 324 | ||
| 8138 |
전갈자리남자
|
9년 전 | 431 | |
| 8137 | 9년 전 | 462 | ||
| 8136 | 9년 전 | 798 | ||
| 8135 |
|
9년 전 | 833 | |
| 8134 |
PlayPixel
|
9년 전 | 569 | |
| 8133 |
|
9년 전 | 489 | |
| 8132 | 9년 전 | 504 | ||
| 8131 | 9년 전 | 871 |
댓글 작성
댓글을 작성하시려면 로그인이 필요합니다.
로그인하기