pChart 2.x forum http://wiki.pchart.net/forum/ |
|
pPie : drawPieLegend bug http://wiki.pchart.net/forum/viewtopic.php?f=5&t=1596 |
Page 1 of 1 |
Author: | undef [ Wed Jun 29, 2011 11:16 pm ] |
Post subject: | 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 ! |
Author: | jean-damien [ Wed Aug 03, 2011 1:21 pm ] |
Post subject: | Re: pPie : drawPieLegend bug |
Just fixed it for the next version. Thanks for having raised it! Kind regards, JD. |
Author: | jean-damien [ Fri Aug 05, 2011 8:50 am ] |
Post subject: | 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. |
Author: | Lizard [ Tue Aug 23, 2011 3:55 pm ] |
Post subject: | 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)); |
Author: | jean-damien [ Wed Aug 24, 2011 6:57 am ] |
Post subject: | 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. |
Author: | Lizard [ Wed Aug 24, 2011 10:04 am ] |
Post subject: | Re: pPie : drawPieLegend bug |
Sure thing, thanks for creating a beautiful library |
Page 1 of 1 | All times are UTC |
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group http://www.phpbb.com/ |