드

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

· 2006-07-20 (목) 09:36:00 · 3769
출처 : 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건
+
제목 글쓴이 날짜 조회
06-09-11 조회 3,285
06-09-10 조회 3,113
06-09-05 조회 5,440
06-09-02 조회 3,907
06-09-01 조회 3,257
06-09-01 조회 3,582
06-08-27 조회 3,364
06-08-27 조회 3,115
06-08-27 조회 2,896
06-08-27 조회 2,641
06-08-27 조회 2,550
06-08-25 조회 4,076
06-08-25 조회 2,615
06-08-23 조회 4,896
06-08-20 조회 3,635
06-08-19 조회 3,461
06-08-18 조회 2,902
06-08-18 조회 3,003
06-08-11 조회 4,164
06-08-10 조회 2,840
06-08-06 조회 4,504
06-08-05 조회 3,291
06-08-05 조회 2,781
06-07-31 조회 3,423
06-07-30 조회 2,973
06-07-29 조회 3,399
06-07-26 조회 2,913
06-07-26 조회 3,316
06-07-25 조회 3,781
06-07-20 조회 3,445
06-07-20 조회 3,739
06-07-19 조회 3,892
06-07-19 조회 2,965
06-07-19 조회 4,797
06-07-14 조회 3,741
06-07-13 조회 4,031
06-07-11 조회 3,089
06-07-11 조회 2,842
06-07-11 조회 4,787
06-07-11 조회 2,604
06-07-11 조회 2,966
06-06-24 조회 4,022
06-06-24 조회 3,478
06-06-13 조회 4,416
06-06-13 조회 3,319
06-06-11 조회 3,226
06-06-08 조회 3,285
06-06-08 조회 3,416
06-06-08 조회 3,842
06-06-07 조회 3,720
06-06-05 조회 3,933
06-06-02 조회 3,511
06-06-01 조회 4,175
06-05-28 조회 3,833
06-05-26 조회 4,386
06-05-22 조회 3,218
06-05-15 조회 3,702
06-05-14 조회 7,051
06-05-11 조회 3,601
06-05-11 조회 4,183
06-05-11 조회 3,642
06-05-11 조회 2,549
06-05-11 조회 2,821
06-05-11 조회 2,476
06-05-10 조회 3,963
06-05-09 조회 4,835
06-05-07 조회 2,640
06-05-07 조회 2,867
06-05-07 조회 2,570
06-05-06 조회 3,747
06-04-28 조회 3,414
06-04-25 조회 3,802
06-04-25 조회 3,534
06-04-22 조회 3,553
06-04-18 조회 4,563
06-04-14 조회 5,226
06-03-27 조회 3,850
06-03-06 조회 3,857
06-03-05 조회 5,163
06-02-24 조회 3,793
06-02-23 조회 4,203
06-02-22 조회 4,036
06-02-22 조회 3,338
06-01-15 조회 3,686
06-01-10 조회 3,647
06-01-05 조회 4,848
05-12-30 조회 5,576
05-12-23 조회 3,705
05-12-01 조회 3,419
05-09-29 조회 4,537
05-09-27 조회 4,916
05-09-22 조회 6,142
05-09-15 조회 3,083
05-09-08 조회 3,955
05-09-05 조회 5,664
05-09-01 조회 4,731
05-09-01 조회 5,865
05-08-21 조회 3,307
05-08-18 조회 3,662
05-08-17 조회 3,765