드

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

· 2006-07-20 (목) 09:36:00 · 3704
출처 : 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-12-15 조회 4,415
06-12-15 조회 2,832
06-12-15 조회 3,141
06-12-15 조회 2,990
06-12-15 조회 2,929
06-12-15 조회 2,714
06-12-15 조회 4,357
06-12-15 조회 2,822
06-12-15 조회 2,986
06-12-15 조회 2,613
06-12-15 조회 3,258
06-12-15 조회 3,509
06-12-15 조회 2,758
06-12-15 조회 2,908
06-12-12 조회 3,260
06-12-11 조회 4,379
06-12-10 조회 4,034
06-12-07 조회 3,546
06-12-07 조회 3,838
06-11-30 조회 3,104
06-11-27 조회 5,441
06-11-11 조회 3,138
06-10-16 조회 3,642
06-10-10 조회 3,347
06-09-27 조회 8,979
06-09-26 조회 4,119
06-09-21 조회 3,776
06-09-21 조회 3,394
06-09-21 조회 4,258
06-09-21 조회 4,219
06-09-21 조회 3,552
06-09-21 조회 3,761
06-09-21 조회 3,612
06-09-21 조회 4,367
06-09-21 조회 4,552
06-09-18 조회 3,469
06-09-15 조회 3,482
06-09-15 조회 3,316
06-09-11 조회 3,615
06-09-11 조회 3,369
06-09-11 조회 3,579
06-09-11 조회 4,932
06-09-11 조회 4,440
06-09-06 조회 3,062
06-09-04 조회 3,814
06-09-02 조회 4,002
06-09-01 조회 4,096
06-08-28 조회 4,292
06-08-27 조회 3,335
06-08-27 조회 2,671
06-08-27 조회 2,572
06-08-27 조회 3,196
06-08-27 조회 2,862
06-08-27 조회 2,912
06-08-27 조회 6,318
06-08-27 조회 2,523
06-08-27 조회 2,452
06-08-24 조회 4,649
06-08-23 조회 2,908
06-08-22 조회 2,856
06-08-22 조회 2,815
06-08-19 조회 2,960
06-08-12 조회 2,925
06-08-11 조회 4,171
06-08-08 조회 2,962
06-08-06 조회 3,317
06-08-05 조회 2,752
06-08-04 조회 3,231
06-08-04 조회 4,198
06-08-03 조회 3,407
06-07-25 조회 3,520
06-07-23 조회 3,279
06-07-22 조회 4,330
06-07-21 조회 2,976
06-07-21 조회 3,187
06-07-21 조회 3,148
06-07-20 조회 4,481
06-07-20 조회 5,269
06-07-20 조회 3,831
06-07-19 조회 4,291
06-07-19 조회 3,212
06-07-19 조회 4,866
06-07-19 조회 4,253
06-07-19 조회 3,375
06-07-12 조회 3,907
06-07-11 조회 5,540
06-07-11 조회 4,201
06-07-11 조회 2,732
06-07-11 조회 4,390
06-07-11 조회 3,512
06-07-11 조회 3,752
06-07-11 조회 2,891
06-07-11 조회 2,790
06-07-11 조회 3,482
06-06-27 조회 4,549
06-06-21 조회 4,228
06-06-15 조회 3,905
06-06-10 조회 3,343
06-06-05 조회 3,139
06-05-31 조회 4,219