Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 0.8.0

Bug #4240 Pie graph - color difference between graph and legend
Submitted: 2005-04-28 14:22 UTC
From: marek dot rybar at dial dot sk Assigned: nosey
Status: Closed Package: Image_Graph
PHP Version: 5.0.4 OS: Win/Linux
Roadmaps: (Not assigned)    
Comments Add Comment Add patch

Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know! Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
Solve the problem : 33 - 16 = ?

 [2005-04-28 14:22 UTC] marek dot rybar at dial dot sk
Description: ------------ When there are two points with the same value, then begin problems with rendered colors between legend and graph ... Legend colors: orange - green - blue - yellow Graph pie: green - blue - yellow - red Reproduce code: --------------- $Dataset->addPoint('Dealer - 1', 2); $Dataset->addPoint('Dealer - 2', 1); $Dataset->addPoint('Dealer - 3', 3); $Dataset->addPoint('Dealer - 4', 2); $FillArray->addNew('gradient', array(IMAGE_GRAPH_GRAD_RADIAL, 'white', 'green')); $FillArray->addNew('gradient', array(IMAGE_GRAPH_GRAD_RADIAL, 'white', 'blue')); $FillArray->addNew('gradient', array(IMAGE_GRAPH_GRAD_RADIAL, 'white', 'yellow')); $FillArray->addNew('gradient', array(IMAGE_GRAPH_GRAD_RADIAL, 'white', 'red')); $FillArray->addNew('gradient', array(IMAGE_GRAPH_GRAD_RADIAL, 'white', 'orange'));


 [2005-05-17 21:11 UTC] pear dot nosey at veggerby dot dk
Problem verified, work in progress
 [2005-06-17 18:36 UTC] pear dot nosey at veggerby dot dk
Problem found and fixed, it will be available in CVS shortly and released with the next version. In the meantime you can fix this by changing the file Pie.php and in the method _legendSample() after the "if (is_array..." statement add the following: if (is_a($this->_fillStyle, "Image_Graph_Fill")) { $this->_fillStyle->_reset(); } I cannot come any closer (i.e. line no) since I do not know which version you are using. /Jesper
 [2005-06-17 18:45 UTC] pear dot nosey at veggerby dot dk
This bug has been fixed in CVS. In case this was a documentation problem, the fix will show up at the end of next Sunday (CET) on In case this was a website problem, the change will show up on the website in short time. Thank you for the report, and for helping us make PEAR better.