PEAR is archived and read-only

This mirror preserves historical PEAR package releases and metadata so existing references remain available.

Home » Images » Image_Graph » Bug #5035

Legend and graph color mismatch when using zeros in stacked bar

Details

Submitted2005-08-09 10:23 UTC
Fromkant at cs dot utwente dot nl
Assignednosey
StatusClosed
PackageImage_Graph
PHP Version4.3.10
OSLinux
Roadmaps(Not assigned)

Comments

[2005-08-09 10:23 UTC] kant at cs dot utwente dot nl

Description:
------------
When I create a stacked bar (plottype Image_Graph_Plot_Bar) and not all values are greater then 0 the Legend colors do not match the Plot colors.
I use the standard Image_Graph_Fill_Array to color the bar. When the first and third dataset has positive values, but the second has value zero, then the third will get the color of the second in the plot.

PEAR 1.3.5
Image_Canvas 0.2.1
Image_Color 1.0.1
Image_Graph 0.5.0

Test script:
---------------
Test script is on http://kant.kabel.utwente.nl/graphtest.html

Expected result:
----------------
A bar with a green and a blue block, as the datasets 1 and two have value 2 and dataset 2 (which has the color yellow, according to the legend) should not be visible.

Actual result:
--------------
The block of dataset 3 is yellow.

[2005-08-24 16:03 UTC] pear dot nosey at veggerby dot dk

This bug has been fixed in CVS.

If this was a documentation problem, the fix will appear on pear.php.net by the end of next Sunday (CET).

If this was a problem with the pear.php.net website, the change should be live shortly.

Otherwise, the fix will appear in the package's next release.

Thank you for the report and for helping us make PEAR better.

New release including this fix is imminent!