View unanswered posts | View active topics It is currently Fri Jun 21, 2024 3:41 pm



Reply to topic  [ 7 posts ] 
pie chart color bleed 
Author Message
Post pie chart color bleed
Image

Using latest release 2.0.7. Created a pie chart that accidentally went off the bottom of the image area without a border around the image. The color of that slice (yellow) then bled all the way to the bottom left of the image. I would imagine that this would not be a big deal since you WANT your pie chart fully visible and not hanging off the edge of your image, just thought I would throw it up here. :D


Thu Dec 16, 2010 11:41 pm
Regular pChart user
Regular pChart user

Joined: Mon Dec 13, 2010 7:54 am
Posts: 13
Location: Gold Coast, Australia
Post Re: pie chart color bleed
any chance you can post the exact code for your graph?

it'd be good to rule out differences in versions of php & GD as a possible culprit.


Fri Dec 17, 2010 2:52 am
Profile
Site Admin
Site Admin
User avatar

Joined: Thu Dec 02, 2010 2:31 pm
Posts: 409
Location: France
Post Re: pie chart color bleed
I believe that it's a bug with the imagefilledpolygon() function of the GD library, I'll try to catch it.


Fri Dec 17, 2010 9:30 am
Profile WWW
Post Re: pie chart color bleed
mykchan wrote:
any chance you can post the exact code for your graph?

it'd be good to rule out differences in versions of php & GD as a possible culprit.


Here ya go. Not much of a departure from the examples...

Code:

/* Create and populate the pData object */
$MyData = new pData();   
$MyData->addPoints($count_array,"ScoreA"); 
$MyData->setSerieDescription("ScoreA","Application A");

/* Define the absissa serie */
$MyData->addPoints($pm_array,"Labels");
$MyData->setAbscissa("Labels");

/* Create the pChart object */
$myPicture = new pImage(348,180,$MyData);
$myPicture->drawGradientArea(0,0,347,179,DIRECTION_HORIZONTAL,array("StartR"=>220,"StartG"=>220,"StartB"=>220,"EndR"=>255,"EndG"=>255,"EndB"=>255,"Alpha"=>100));
$myPicture->drawGradientArea(0,0,348,23,DIRECTION_VERTICAL,array("StartR"=>58,"StartG"=>58,"StartB"=>58,"EndR"=>58,"EndG"=>58,"EndB"=>58,"Alpha"=>100));

/* Add a border to the picture */
$myPicture->drawRectangle(0,0,347,179,array("R"=>0,"G"=>0,"B"=>0));

/* Write the picture title */
$myPicture->setFontProperties(array("FontName"=>"fonts/Forgotte.ttf","FontSize"=>18));
$myPicture->drawText(88,21,"E-Imports Open Projects",array("R"=>255,"G"=>255,"B"=>255));

/* Set the default font properties */
$myPicture->setFontProperties(array("FontName"=>"../fonts/Forgotte.ttf","FontSize"=>10,"R"=>80,"G"=>80,"B"=>80));

/* Enable shadow computing */
$myPicture->setShadow(TRUE,array("X"=>2,"Y"=>2,"R"=>150,"G"=>150,"B"=>150,"Alpha"=>100));

/* Create the pPie object */
$PieChart = new pPie($myPicture,$MyData);

/* Draw one AA pie chart */
$myPicture->setFontProperties(array("FontName"=>"fonts/CALIBRI.TTF","FontSize"=>10));
$PieChart->draw2DPie(170,100,array("Radius"=>38,"DrawLabels"=>TRUE,"Border"=>TRUE));


/* Render the picture (choose the best way) */
$myPicture->autoOutput("pictures/example.drawPieLegend.png");


Fri Dec 17, 2010 5:02 pm
Post Re: pie chart color bleed
PHP Version 5.2.6
GD Version bundled (2.0.34 compatible)


Fri Dec 17, 2010 5:05 pm
New pChart user
New pChart user

Joined: Fri Mar 23, 2012 2:36 am
Posts: 1
Location: Cebu, Philippines
Post Re: pie chart color bleed
It's a great color pie chart and it's very colorful and wonderful. I like this topic because it's very useful for research and studies in school. :D :mrgreen: :lol:

Waterproof spray

_________________
Waterproof spray


Fri Mar 23, 2012 3:01 am
Profile
New pChart user
New pChart user

Joined: Thu Apr 19, 2012 2:14 pm
Posts: 1
Post Re: pie chart color bleed
PHP Version 5.2.6
GD Version bundled (2.0.34 compatible)

_________________
mcse ,mcts ,70-640 ,70-643 ,


Thu Apr 19, 2012 2:16 pm
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 7 posts ] 

Who is online

Users browsing this forum: No registered users and 1 guest


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

Search for:
Jump to:  
cron