<?
# 그래프 출력을 위한 데이터의 최대값및 최소값 세팅
$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);
?>
게시판 목록
프로그램
| 번호 | 제목 | 글쓴이 | 날짜 | 조회 |
|---|---|---|---|---|
| 7830 | 9년 전 | 399 | ||
| 7829 |
|
9년 전 | 579 | |
| 7828 | 9년 전 | 508 | ||
| 7827 | 9년 전 | 403 | ||
| 7826 | 9년 전 | 408 | ||
| 7825 | 9년 전 | 456 | ||
| 7824 | 9년 전 | 433 | ||
| 7823 | 9년 전 | 348 | ||
| 7822 | 10년 전 | 337 | ||
| 7821 | 10년 전 | 292 | ||
| 7820 | 10년 전 | 334 | ||
| 7819 |
|
10년 전 | 737 | |
| 7818 | 10년 전 | 367 | ||
| 7817 | 10년 전 | 490 | ||
| 7816 | 10년 전 | 388 | ||
| 7815 | 10년 전 | 591 | ||
| 7814 | 10년 전 | 414 | ||
| 7813 | 10년 전 | 356 | ||
| 7812 | 10년 전 | 376 | ||
| 7811 | 10년 전 | 381 | ||
| 7810 | 10년 전 | 540 | ||
| 7809 | 10년 전 | 468 | ||
| 7808 | 10년 전 | 348 | ||
| 7807 | 10년 전 | 387 | ||
| 7806 |
프로그래머7
|
10년 전 | 1318 | |
| 7805 | 10년 전 | 1253 | ||
| 7804 |
zahir1312
|
10년 전 | 763 | |
| 7803 |
|
10년 전 | 1357 | |
| 7802 | 10년 전 | 446 | ||
| 7801 | 10년 전 | 849 | ||
| 7800 | 10년 전 | 1074 | ||
| 7799 | 10년 전 | 531 | ||
| 7798 | 10년 전 | 486 | ||
| 7797 | 10년 전 | 489 | ||
| 7796 | 10년 전 | 327 | ||
| 7795 | 10년 전 | 481 | ||
| 7794 | 10년 전 | 521 | ||
| 7793 | 10년 전 | 1027 | ||
| 7792 | 10년 전 | 439 | ||
| 7791 | 10년 전 | 528 | ||
| 7790 | 10년 전 | 485 | ||
| 7789 |
fbastore
|
10년 전 | 1424 | |
| 7788 | 10년 전 | 519 | ||
| 7787 | 10년 전 | 381 | ||
| 7786 | 10년 전 | 548 | ||
| 7785 | 10년 전 | 555 | ||
| 7784 | 10년 전 | 613 | ||
| 7783 | 10년 전 | 423 | ||
| 7782 | 10년 전 | 470 | ||
| 7781 | 10년 전 | 881 | ||
| 7780 | 10년 전 | 798 | ||
| 7779 | 10년 전 | 766 | ||
| 7778 | 10년 전 | 347 | ||
| 7777 | 10년 전 | 432 | ||
| 7776 | 10년 전 | 438 | ||
| 7775 | 10년 전 | 381 | ||
| 7774 | 10년 전 | 620 | ||
| 7773 | 10년 전 | 366 | ||
| 7772 | 10년 전 | 710 | ||
| 7771 | 10년 전 | 357 | ||
| 7770 | 10년 전 | 632 | ||
| 7769 | 10년 전 | 358 | ||
| 7768 | 10년 전 | 583 | ||
| 7767 | 10년 전 | 1149 | ||
| 7766 | 10년 전 | 476 | ||
| 7765 | 10년 전 | 501 | ||
| 7764 |
잘살아보자
|
10년 전 | 358 | |
| 7763 |
|
10년 전 | 1430 | |
| 7762 |
Tosea
|
10년 전 | 1039 | |
| 7761 | 10년 전 | 626 | ||
| 7760 |
잘살아보자
|
10년 전 | 658 | |
| 7759 |
잘살아보자
|
10년 전 | 478 | |
| 7758 |
잘살아보자
|
10년 전 | 569 | |
| 7757 | 10년 전 | 1220 | ||
| 7756 |
ITBANK
|
10년 전 | 1240 | |
| 7755 | 10년 전 | 1917 | ||
| 7754 | 10년 전 | 1037 | ||
| 7753 | 10년 전 | 860 | ||
| 7752 | 10년 전 | 1370 | ||
| 7751 |
잘살아보자
|
10년 전 | 506 | |
| 7750 |
잘살아보자
|
10년 전 | 461 | |
| 7749 |
잘살아보자
|
10년 전 | 465 | |
| 7748 |
잘살아보자
|
10년 전 | 455 | |
| 7747 |
잘살아보자
|
10년 전 | 554 | |
| 7746 |
잘살아보자
|
10년 전 | 665 | |
| 7745 |
잘살아보자
|
10년 전 | 897 | |
| 7744 |
잘살아보자
|
10년 전 | 404 | |
| 7743 | 10년 전 | 929 | ||
| 7742 |
starbros
|
10년 전 | 817 | |
| 7741 |
잘살아보자
|
10년 전 | 646 | |
| 7740 |
잘살아보자
|
10년 전 | 509 | |
| 7739 |
잘살아보자
|
10년 전 | 450 | |
| 7738 |
잘살아보자
|
10년 전 | 514 | |
| 7737 |
잘살아보자
|
10년 전 | 476 | |
| 7736 |
잘살아보자
|
10년 전 | 495 | |
| 7735 |
잘살아보자
|
10년 전 | 826 | |
| 7734 |
잘살아보자
|
10년 전 | 418 | |
| 7733 |
잘살아보자
|
10년 전 | 525 | |
| 7732 |
잘살아보자
|
10년 전 | 678 | |
| 7731 |
잘살아보자
|
10년 전 | 601 |
댓글 작성
댓글을 작성하시려면 로그인이 필요합니다.
로그인하기