pChart 2.x forum
http://wiki.pchart.net/forum/

pie chart color bleed
http://wiki.pchart.net/forum/viewtopic.php?f=5&t=33
Page 1 of 1

Author:  tatorface [ Thu Dec 16, 2010 11:41 pm ]
Post subject:  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

Author:  mykchan [ Fri Dec 17, 2010 2:52 am ]
Post subject:  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.

Author:  jean-damien [ Fri Dec 17, 2010 9:30 am ]
Post subject:  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.

Author:  Guest [ Fri Dec 17, 2010 5:02 pm ]
Post subject:  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");

Author:  tatorface [ Fri Dec 17, 2010 5:05 pm ]
Post subject:  Re: pie chart color bleed

PHP Version 5.2.6
GD Version bundled (2.0.34 compatible)

Author:  protectedproof12 [ Fri Mar 23, 2012 3:01 am ]
Post subject:  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

Author:  shelly2222 [ Thu Apr 19, 2012 2:16 pm ]
Post subject:  Re: pie chart color bleed

PHP Version 5.2.6
GD Version bundled (2.0.34 compatible)

Page 1 of 1 All times are UTC
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/