<?
# 그래프 출력을 위한 데이터의 최대값및 최소값 세팅
$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);
?>
게시판 목록
프로그램
| 번호 | 제목 | 글쓴이 | 날짜 | 조회 |
|---|---|---|---|---|
| 7930 | 9년 전 | 487 | ||
| 7929 | 9년 전 | 420 | ||
| 7928 | 9년 전 | 495 | ||
| 7927 | 9년 전 | 403 | ||
| 7926 | 9년 전 | 714 | ||
| 7925 | 9년 전 | 439 | ||
| 7924 | 9년 전 | 419 | ||
| 7923 | 9년 전 | 412 | ||
| 7922 | 9년 전 | 434 | ||
| 7921 | 9년 전 | 450 | ||
| 7920 | 9년 전 | 358 | ||
| 7919 | 9년 전 | 366 | ||
| 7918 | 9년 전 | 516 | ||
| 7917 | 9년 전 | 376 | ||
| 7916 | 9년 전 | 461 | ||
| 7915 | 9년 전 | 479 | ||
| 7914 | 9년 전 | 487 | ||
| 7913 | 10년 전 | 658 | ||
| 7912 | 10년 전 | 497 | ||
| 7911 | 10년 전 | 418 | ||
| 7910 | 10년 전 | 467 | ||
| 7909 | 10년 전 | 583 | ||
| 7908 | 10년 전 | 515 | ||
| 7907 | 10년 전 | 459 | ||
| 7906 | 10년 전 | 480 | ||
| 7905 | 10년 전 | 442 | ||
| 7904 | 10년 전 | 433 | ||
| 7903 | 10년 전 | 440 | ||
| 7902 | 10년 전 | 619 | ||
| 7901 |
|
10년 전 | 788 | |
| 7900 | 10년 전 | 673 | ||
| 7899 | 10년 전 | 461 | ||
| 7898 | 10년 전 | 456 | ||
| 7897 | 10년 전 | 415 | ||
| 7896 | 10년 전 | 430 | ||
| 7895 | 10년 전 | 552 | ||
| 7894 | 10년 전 | 458 | ||
| 7893 | 10년 전 | 432 | ||
| 7892 | 10년 전 | 472 | ||
| 7891 | 10년 전 | 828 | ||
| 7890 | 10년 전 | 1256 | ||
| 7889 | 10년 전 | 799 | ||
| 7888 |
limsy1987
|
10년 전 | 611 | |
| 7887 | 10년 전 | 651 | ||
| 7886 | 10년 전 | 534 | ||
| 7885 | 10년 전 | 503 | ||
| 7884 | 10년 전 | 497 | ||
| 7883 | 10년 전 | 503 | ||
| 7882 | 10년 전 | 558 | ||
| 7881 | 10년 전 | 539 | ||
| 7880 | 10년 전 | 655 | ||
| 7879 | 10년 전 | 545 | ||
| 7878 | 10년 전 | 1308 | ||
| 7877 | 10년 전 | 837 | ||
| 7876 | 10년 전 | 573 | ||
| 7875 | 10년 전 | 647 | ||
| 7874 |
|
10년 전 | 852 | |
| 7873 | 10년 전 | 579 | ||
| 7872 | 10년 전 | 735 | ||
| 7871 | 10년 전 | 553 | ||
| 7870 | 10년 전 | 671 | ||
| 7869 | 10년 전 | 489 | ||
| 7868 | 10년 전 | 529 | ||
| 7867 | 10년 전 | 537 | ||
| 7866 | 10년 전 | 593 | ||
| 7865 | 10년 전 | 537 | ||
| 7864 | 10년 전 | 590 | ||
| 7863 | 10년 전 | 588 | ||
| 7862 | 10년 전 | 558 | ||
| 7861 | 10년 전 | 728 | ||
| 7860 | 10년 전 | 706 | ||
| 7859 | 10년 전 | 474 | ||
| 7858 | 10년 전 | 781 | ||
| 7857 | 10년 전 | 1169 | ||
| 7856 | 10년 전 | 596 | ||
| 7855 | 10년 전 | 838 | ||
| 7854 | 10년 전 | 780 | ||
| 7853 | 10년 전 | 676 | ||
| 7852 | 10년 전 | 592 | ||
| 7851 | 10년 전 | 592 | ||
| 7850 | 10년 전 | 672 | ||
| 7849 | 10년 전 | 444 | ||
| 7848 | 10년 전 | 508 | ||
| 7847 | 10년 전 | 741 | ||
| 7846 | 10년 전 | 528 | ||
| 7845 | 10년 전 | 500 | ||
| 7844 | 10년 전 | 470 | ||
| 7843 | 10년 전 | 507 | ||
| 7842 | 10년 전 | 487 | ||
| 7841 | 10년 전 | 456 | ||
| 7840 | 10년 전 | 481 | ||
| 7839 | 10년 전 | 519 | ||
| 7838 | 10년 전 | 590 | ||
| 7837 | 10년 전 | 419 | ||
| 7836 | 10년 전 | 460 | ||
| 7835 | 10년 전 | 547 | ||
| 7834 |
|
10년 전 | 1248 | |
| 7833 | 10년 전 | 508 | ||
| 7832 | 10년 전 | 491 | ||
| 7831 | 10년 전 | 663 |
댓글 작성
댓글을 작성하시려면 로그인이 필요합니다.
로그인하기