<?
# 그래프 출력을 위한 데이터의 최대값및 최소값 세팅
$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);
?>
게시판 목록
프로그램
| 번호 | 제목 | 글쓴이 | 날짜 | 조회 |
|---|---|---|---|---|
| 8030 | 9년 전 | 388 | ||
| 8029 | 9년 전 | 316 | ||
| 8028 | 9년 전 | 275 | ||
| 8027 | 9년 전 | 289 | ||
| 8026 | 9년 전 | 353 | ||
| 8025 | 9년 전 | 394 | ||
| 8024 | 9년 전 | 353 | ||
| 8023 | 9년 전 | 403 | ||
| 8022 | 9년 전 | 326 | ||
| 8021 | 9년 전 | 336 | ||
| 8020 | 9년 전 | 329 | ||
| 8019 | 9년 전 | 349 | ||
| 8018 | 9년 전 | 454 | ||
| 8017 | 9년 전 | 540 | ||
| 8016 | 9년 전 | 342 | ||
| 8015 | 9년 전 | 398 | ||
| 8014 | 9년 전 | 332 | ||
| 8013 | 9년 전 | 246 | ||
| 8012 | 9년 전 | 253 | ||
| 8011 | 9년 전 | 454 | ||
| 8010 | 9년 전 | 309 | ||
| 8009 | 9년 전 | 309 | ||
| 8008 | 9년 전 | 293 | ||
| 8007 | 9년 전 | 437 | ||
| 8006 | 9년 전 | 473 | ||
| 8005 |
|
9년 전 | 976 | |
| 8004 | 9년 전 | 366 | ||
| 8003 | 9년 전 | 432 | ||
| 8002 | 9년 전 | 327 | ||
| 8001 |
|
9년 전 | 670 | |
| 8000 | 9년 전 | 432 | ||
| 7999 | 9년 전 | 382 | ||
| 7998 | 9년 전 | 440 | ||
| 7997 | 9년 전 | 319 | ||
| 7996 | 9년 전 | 544 | ||
| 7995 | 9년 전 | 467 | ||
| 7994 | 9년 전 | 344 | ||
| 7993 | 9년 전 | 409 | ||
| 7992 | 9년 전 | 519 | ||
| 7991 | 9년 전 | 261 | ||
| 7990 | 9년 전 | 302 | ||
| 7989 | 9년 전 | 314 | ||
| 7988 | 9년 전 | 741 | ||
| 7987 | 9년 전 | 439 | ||
| 7986 | 9년 전 | 436 | ||
| 7985 | 9년 전 | 517 | ||
| 7984 | 9년 전 | 439 | ||
| 7983 | 9년 전 | 674 | ||
| 7982 | 9년 전 | 536 | ||
| 7981 | 9년 전 | 488 | ||
| 7980 | 9년 전 | 510 | ||
| 7979 | 9년 전 | 490 | ||
| 7978 | 9년 전 | 466 | ||
| 7977 | 9년 전 | 406 | ||
| 7976 | 9년 전 | 860 | ||
| 7975 | 9년 전 | 372 | ||
| 7974 | 9년 전 | 405 | ||
| 7973 | 9년 전 | 607 | ||
| 7972 | 9년 전 | 394 | ||
| 7971 | 9년 전 | 467 | ||
| 7970 | 9년 전 | 312 | ||
| 7969 | 9년 전 | 553 | ||
| 7968 | 9년 전 | 391 | ||
| 7967 | 9년 전 | 381 | ||
| 7966 | 9년 전 | 383 | ||
| 7965 |
|
9년 전 | 1023 | |
| 7964 | 9년 전 | 410 | ||
| 7963 | 9년 전 | 411 | ||
| 7962 | 9년 전 | 396 | ||
| 7961 |
전갈자리남자
|
9년 전 | 513 | |
| 7960 | 9년 전 | 976 | ||
| 7959 | 9년 전 | 560 | ||
| 7958 | 9년 전 | 419 | ||
| 7957 | 9년 전 | 374 | ||
| 7956 | 9년 전 | 373 | ||
| 7955 | 9년 전 | 468 | ||
| 7954 | 9년 전 | 393 | ||
| 7953 | 9년 전 | 442 | ||
| 7952 | 9년 전 | 365 | ||
| 7951 | 9년 전 | 508 | ||
| 7950 | 9년 전 | 400 | ||
| 7949 | 9년 전 | 396 | ||
| 7948 | 9년 전 | 331 | ||
| 7947 | 9년 전 | 944 | ||
| 7946 | 9년 전 | 449 | ||
| 7945 | 9년 전 | 405 | ||
| 7944 | 9년 전 | 440 | ||
| 7943 | 9년 전 | 394 | ||
| 7942 | 9년 전 | 410 | ||
| 7941 | 9년 전 | 406 | ||
| 7940 | 9년 전 | 898 | ||
| 7939 | 9년 전 | 365 | ||
| 7938 | 9년 전 | 402 | ||
| 7937 | 9년 전 | 291 | ||
| 7936 | 9년 전 | 891 | ||
| 7935 | 9년 전 | 461 | ||
| 7934 | 9년 전 | 432 | ||
| 7933 | 9년 전 | 539 | ||
| 7932 | 9년 전 | 502 | ||
| 7931 | 9년 전 | 553 |
댓글 작성
댓글을 작성하시려면 로그인이 필요합니다.
로그인하기