드

php에 GD용 심플챠트 라이브러리

· 2006-07-20 (목) 09:36:00 · 3707
출처 : http://www.phpschool.com/gnuboard4/bbs/board.php?bo_table=tipntech&wr_id=29645&sca=&sfl=wr_subject%7C%7Cwr_content&stx=%C2%F7%C6%AE&sop=and





▶ 파나챠트

다운로드 및 설치 사이트

http://www.panacode.com/panachart/

스크린샷

http://www.panacode.com/panachart/index.php?SEC=screenshots

다운로드

http://www.panacode.com/panachart/index.php?SEC=download



▶ JpGraph

http://www.aditus.nu/jpgraph/


다운로드

http://www.aditus.nu/jpgraph/jpdownload.php



=====================

=====수정할부분 =====

=====================

한굴출력 방법은 아래와 같습니다.
우선 panachart.php 를 열고 아래부분을 찾아서
// plot title
if($this->m_title){
imagestring ($this->m_image,
$this->m_font,
($this->m_width-strlen($this->m_title)*$this->m_fontWidth)/2,
$margin,
$this->m_title,
$this->m_textColor);
}

imagestring 부분을 imagettftext 함수로 변경만 하면 끝입니다.

imagettftext(
$this->m_image,
$this->m_font,
0,
($this->m_width-strlen($this->m_title)*$this->m_fontWidth)/2,
$margin+10,
$this->m_textColor, \"[투루타입이 있는 글꼴 PATH]\", iconv(\"cp949\",\"UTF-8\",$this->m_title));

ps : $margin 값이 약간 차이가 나서 임의로 10을 더 plus 시켰더니 안짤리고 잘 나오더군여



====================================================================================

지금 panachart v0.9.2 를 사용중인데.. 최대값과 최소값이 같을때 버그가 있더군요..

function addSeries(...) 에 보시면 다음과 같은 구문이 있을겁니다.
if($minValue < $this->m_minValue) $this->m_minValue = $minValue;
if($maxValue > $this->m_maxValue) $this->m_maxValue = $maxValue;

바로 이 다음줄에 다음과 같이 추가해주세요

if ($this->m_minValue == $this->m_maxValue) $this->m_maxValue++;

그럼 에러나는 문제 해결 됩니다..
참고하시길..<div class='small'>[이 게시물은 관리자님에 의해 2011-10-31 17:12:10 PHP & HTML에서 이동 됨]</div>
|
댓글을 작성하시려면 로그인이 필요합니다.

프로그램

8,188건
+
제목 글쓴이 날짜 조회
10-09-25 조회 2,710
10-09-19 조회 2,742
10-09-15 조회 2,745
10-09-15 조회 4,148
10-09-15 조회 3,368
10-09-15 조회 2,479
10-09-07 조회 3,593
10-08-27 조회 4,048
10-06-11 조회 4,209
10-05-31 조회 2,458
10-02-27 조회 4,991
10-02-09 조회 3,738
09-10-10 조회 7,330
09-03-19 조회 3,172
09-02-09 조회 3,449
09-02-09 조회 4,521
08-11-01 조회 2,901
08-09-29 조회 4,552
08-09-26 조회 3,508
08-09-26 조회 3,585
08-09-26 조회 2,720
08-09-26 조회 3,763
08-09-26 조회 3,485
08-09-26 조회 4,250
08-09-18 조회 3,563
08-09-09 조회 3,214
08-08-28 조회 2,755
08-07-06 조회 3,531
08-05-21 조회 4,686
08-05-13 조회 4,526
08-04-17 조회 4,899
08-02-19 조회 3,529
08-01-18 조회 3,833
08-01-10 조회 3,804
07-10-22 조회 3,640
07-10-09 조회 4,286
07-10-03 조회 3,497
07-07-06 조회 4,207
07-07-06 조회 4,420
07-07-06 조회 4,030
07-06-28 조회 3,555
07-06-05 조회 3,559
07-06-05 조회 4,102
07-05-30 조회 3,270
07-05-02 조회 3,679
07-04-15 조회 5,098
07-04-11 조회 3,619
07-04-05 조회 3,909
07-03-31 조회 3,143
07-03-31 조회 4,118
07-03-30 조회 3,722
07-03-24 조회 3,996
07-03-22 조회 3,649
07-03-12 조회 4,399
07-02-16 조회 3,256
07-02-14 조회 5,156
07-02-10 조회 3,984
07-02-09 조회 4,371
07-01-19 조회 4,032
07-01-16 조회 4,961
06-12-16 조회 5,826
06-11-30 조회 3,582
06-11-25 조회 3,684
06-10-15 조회 5,052
06-09-26 조회 5,297
06-09-26 조회 5,416
06-09-22 조회 4,250
06-09-21 조회 3,534
06-09-21 조회 3,619
06-09-02 조회 3,475
06-08-08 조회 5,105
06-07-20 조회 3,708
06-07-17 조회 3,337
06-07-13 조회 4,160
06-07-11 조회 3,456
06-07-11 조회 3,459
06-07-11 조회 3,825
06-06-29 조회 6,041
06-06-19 조회 6,442
06-06-02 조회 3,492
06-05-24 조회 4,980
06-05-14 조회 7,757
06-05-08 조회 3,871
06-02-02 조회 5,445
05-12-16 조회 4,492
05-12-05 조회 5,143
05-06-28 조회 4,094
05-04-11 조회 4,045
05-04-11 조회 4,238
05-04-11 조회 3,303
05-03-13 조회 3,208
05-03-12 조회 4,290
04-12-08 조회 7,767
04-12-01 조회 5,170
04-11-28 조회 3,326
04-11-28 조회 3,172
04-08-05 조회 5,600
04-08-05 조회 4,945
04-08-05 조회 5,547