|
|
Page 1 of 1
|
[ 6 posts ] |
|
Author |
Message |
undef
New pChart user
Joined: Wed Jun 29, 2011 11:11 pm Posts: 1
|
pPie : drawPieLegend bug
Hello, There's a small bug in pPie, the drawPieLegend function (in 2.1.0, haven't looked in 2.1.1) The FontName and FontSize argument are ignored when writing the legend text. I fixed it, starting from line 686 Code: if ( $Mode == LEGEND_VERTICAL ) { $this->pChartObject->drawText($X+$BoxSize+4,$Y+$BoxSize/2,$Value,array("R"=>$FontR,"G"=>$FontG,"B"=>$FontB,"Align"=>TEXT_ALIGN_MIDDLELEFT,"FontName"=>$FontName,"FontSize"=>$FontSize)); $Y=$Y+$YStep; } elseif ( $Mode == LEGEND_HORIZONTAL ) { $BoxArray = $this->pChartObject->drawText($X+$BoxSize+4,$Y+$BoxSize/2,$Value,array("R"=>$FontR,"G"=>$FontG,"B"=>$FontB,"Align"=>TEXT_ALIGN_MIDDLELEFT,"FontName"=>$FontName,"FontSize"=>$FontSize)); $X=$BoxArray[1]["X"]+2+$XStep; } I love the library, really good work !
|
Wed Jun 29, 2011 11:16 pm |
|
|
jean-damien
Site Admin
Joined: Thu Dec 02, 2010 2:31 pm Posts: 409 Location: France
|
Re: pPie : drawPieLegend bug
Just fixed it for the next version.
Thanks for having raised it!
Kind regards, JD.
|
Wed Aug 03, 2011 1:21 pm |
|
|
jean-damien
Site Admin
Joined: Thu Dec 02, 2010 2:31 pm Posts: 409 Location: France
|
Re: pPie : drawPieLegend bug
The 2.1.2 version has been published yesterday correcting this bug and is now available for download at http://www.pchart.net/download. JD.
|
Fri Aug 05, 2011 8:50 am |
|
|
Lizard
New pChart user
Joined: Tue Aug 23, 2011 3:50 pm Posts: 2
|
Re: pPie : drawPieLegend bug
Seems like the bug is still not fixed for me in 2.1.2. I had to insert the parameters manually into the drawText calls as well (lines 1715 and 1725 in pDraw.class.php): Code: $this->drawText($X+$IconAreaWidth+4,$Y+$IconAreaHeight/2+(($this->FontSize+3)*$Key),$Value,array("R"=>$FontR,"G"=>$FontG,"B"=>$FontB,"Align"=>TEXT_ALIGN_MIDDLELEFT,"FontSize"=>$FontSize,"FontName"=>$FontName)); /* ... */ $BoxArray = $this->drawText($X+$IconAreaWidth+4,$Y+$IconAreaHeight/2+(($this->FontSize+3)*$Key),$Value,array("R"=>$FontR,"G"=>$FontG,"B"=>$FontB,"Align"=>TEXT_ALIGN_MIDDLELEFT,"FontSize"=>$FontSize,"FontName"=>$FontName));
|
Tue Aug 23, 2011 3:55 pm |
|
|
jean-damien
Site Admin
Joined: Thu Dec 02, 2010 2:31 pm Posts: 409 Location: France
|
Re: pPie : drawPieLegend bug
The original issue was related to the pie legend function, the one you're reporting is related to the basic legend function, that's why it remains. Just fixed it for the next sub release.
Thank you for having reported it ;o)
JD.
|
Wed Aug 24, 2011 6:57 am |
|
|
Lizard
New pChart user
Joined: Tue Aug 23, 2011 3:50 pm Posts: 2
|
Re: pPie : drawPieLegend bug
Sure thing, thanks for creating a beautiful library
|
Wed Aug 24, 2011 10:04 am |
|
|
|
Page 1 of 1
|
[ 6 posts ] |
|
Who is online |
Users browsing this forum: No registered users and 4 guests |
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot post attachments in this forum
|
|
|