<?
# 그래프 출력을 위한 데이터의 최대값및 최소값 세팅
$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년 전 | 437 | ||
| 7829 |
|
9년 전 | 623 | |
| 7828 | 10년 전 | 551 | ||
| 7827 | 10년 전 | 446 | ||
| 7826 | 10년 전 | 451 | ||
| 7825 | 10년 전 | 492 | ||
| 7824 | 10년 전 | 455 | ||
| 7823 | 10년 전 | 398 | ||
| 7822 | 10년 전 | 373 | ||
| 7821 | 10년 전 | 320 | ||
| 7820 | 10년 전 | 357 | ||
| 7819 |
|
10년 전 | 755 | |
| 7818 | 10년 전 | 402 | ||
| 7817 | 10년 전 | 535 | ||
| 7816 | 10년 전 | 421 | ||
| 7815 | 10년 전 | 620 | ||
| 7814 | 10년 전 | 447 | ||
| 7813 | 10년 전 | 398 | ||
| 7812 | 10년 전 | 412 | ||
| 7811 | 10년 전 | 401 | ||
| 7810 | 10년 전 | 582 | ||
| 7809 | 10년 전 | 515 | ||
| 7808 | 10년 전 | 386 | ||
| 7807 | 10년 전 | 421 | ||
| 7806 |
프로그래머7
|
10년 전 | 1343 | |
| 7805 | 10년 전 | 1288 | ||
| 7804 |
zahir1312
|
10년 전 | 789 | |
| 7803 |
|
10년 전 | 1383 | |
| 7802 | 10년 전 | 473 | ||
| 7801 | 10년 전 | 869 | ||
| 7800 | 10년 전 | 1090 | ||
| 7799 | 10년 전 | 567 | ||
| 7798 | 10년 전 | 523 | ||
| 7797 | 10년 전 | 526 | ||
| 7796 | 10년 전 | 369 | ||
| 7795 | 10년 전 | 519 | ||
| 7794 | 10년 전 | 568 | ||
| 7793 | 10년 전 | 1065 | ||
| 7792 | 10년 전 | 491 | ||
| 7791 | 10년 전 | 569 | ||
| 7790 | 10년 전 | 520 | ||
| 7789 |
fbastore
|
10년 전 | 1458 | |
| 7788 | 10년 전 | 559 | ||
| 7787 | 10년 전 | 416 | ||
| 7786 | 10년 전 | 607 | ||
| 7785 | 10년 전 | 599 | ||
| 7784 | 10년 전 | 656 | ||
| 7783 | 10년 전 | 465 | ||
| 7782 | 10년 전 | 503 | ||
| 7781 | 10년 전 | 910 | ||
| 7780 | 10년 전 | 830 | ||
| 7779 | 10년 전 | 780 | ||
| 7778 | 10년 전 | 369 | ||
| 7777 | 10년 전 | 472 | ||
| 7776 | 10년 전 | 470 | ||
| 7775 | 10년 전 | 416 | ||
| 7774 | 10년 전 | 637 | ||
| 7773 | 10년 전 | 394 | ||
| 7772 | 10년 전 | 749 | ||
| 7771 | 10년 전 | 401 | ||
| 7770 | 10년 전 | 654 | ||
| 7769 | 10년 전 | 402 | ||
| 7768 | 10년 전 | 624 | ||
| 7767 | 10년 전 | 1185 | ||
| 7766 | 10년 전 | 502 | ||
| 7765 | 10년 전 | 549 | ||
| 7764 |
잘살아보자
|
10년 전 | 407 | |
| 7763 |
|
10년 전 | 1471 | |
| 7762 |
Tosea
|
10년 전 | 1069 | |
| 7761 | 10년 전 | 663 | ||
| 7760 |
잘살아보자
|
10년 전 | 699 | |
| 7759 |
잘살아보자
|
10년 전 | 529 | |
| 7758 |
잘살아보자
|
10년 전 | 606 | |
| 7757 | 10년 전 | 1250 | ||
| 7756 |
ITBANK
|
10년 전 | 1267 | |
| 7755 | 10년 전 | 1936 | ||
| 7754 | 10년 전 | 1065 | ||
| 7753 | 10년 전 | 897 | ||
| 7752 | 10년 전 | 1408 | ||
| 7751 |
잘살아보자
|
10년 전 | 548 | |
| 7750 |
잘살아보자
|
10년 전 | 490 | |
| 7749 |
잘살아보자
|
10년 전 | 499 | |
| 7748 |
잘살아보자
|
10년 전 | 515 | |
| 7747 |
잘살아보자
|
10년 전 | 604 | |
| 7746 |
잘살아보자
|
10년 전 | 688 | |
| 7745 |
잘살아보자
|
10년 전 | 927 | |
| 7744 |
잘살아보자
|
10년 전 | 427 | |
| 7743 | 10년 전 | 959 | ||
| 7742 |
starbros
|
10년 전 | 850 | |
| 7741 |
잘살아보자
|
10년 전 | 682 | |
| 7740 |
잘살아보자
|
10년 전 | 556 | |
| 7739 |
잘살아보자
|
10년 전 | 472 | |
| 7738 |
잘살아보자
|
10년 전 | 549 | |
| 7737 |
잘살아보자
|
10년 전 | 520 | |
| 7736 |
잘살아보자
|
10년 전 | 536 | |
| 7735 |
잘살아보자
|
10년 전 | 863 | |
| 7734 |
잘살아보자
|
10년 전 | 438 | |
| 7733 |
잘살아보자
|
10년 전 | 551 | |
| 7732 |
잘살아보자
|
10년 전 | 711 | |
| 7731 |
잘살아보자
|
10년 전 | 630 |
댓글 작성
댓글을 작성하시려면 로그인이 필요합니다.
로그인하기