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

Bug #10161 Different behaviour with bar graphs in 0.7.1 and 0.7.2
Submitted: 2007-02-23 08:33 UTC
From: mj Assigned:
Status: Verified Package: Image_Graph (version 0.8.0)
PHP Version: 5.2.0 OS: Linux
Roadmaps: (Not assigned)    
Subscription  
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:
MUST BE VALID
Solve the problem : 38 - 28 = ?

 
 [2007-02-23 08:33 UTC] mj (Martin Jansen)
Description: ------------ The reproducing script below generates a bar graph with a single bar in it. With Image_Graph 0.7.2 the bar is positioned at the left edge of the plot area and half of it seems to be outside of the drawable area. With version 0.7.1 this works as expected -- the bar is situated in the center of the plot area. The following screenshots illustrate this: * Correct behaviour in 0.7.1: http://divbyzero.net/stuff/0.7.1.png * Incorrect behaviour in 0.7.2: http://divbyzero.net/stuff/0.7.2.png Test script: --------------- <?php require "Image/Graph.php"; $canvas = Image_Canvas::factory("png", array("width" => 500, "height" => 300)); $graph = Image_Graph::factory("graph", $canvas); $graph->add($plotarea = Image_Graph::factory("plotarea")); $dataset = Image_Graph::factory("dataset"); $dataset->addPoint(42, 50); $plot = $plotarea->addNew("bar", $dataset); $width = (int)($graph->width() / $dataset->count()); $width = min(max($width, 15), 80); $plot->setBarWidth($width, "px"); $graph->done(); Expected result: ---------------- The graph from 0.7.2 should look like the one in 0.7.1.

Comments

 [2007-03-15 14:54 UTC] mhorner (Matt Horner)
I have also been able to reproduce this on an HP-UX platform. Uninstalling 0.7.2 and installing 0.7.1 resolved my problem.
 [2009-12-06 08:40 UTC] neufeind (Stefan Neufeind)
I also can confirm that's still an open issue with the version from SVN.
 [2011-08-28 16:25 UTC] doconnor (Daniel O'Connor)
-Package Version: 0.7.2 +Package Version: 0.8.0
Stefan; I assume that your comment at the time applies also to 0.8.0+?
 [2011-08-28 16:26 UTC] doconnor (Daniel O'Connor)
-Status: Open +Status: Verified