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

Bug #16335 Single bars have zero width
Submitted: 2009-06-16 15:45 UTC
From: tsteven Assigned:
Status: Open Package: Image_Graph (version 0.7.2)
PHP Version: 5.2.5 OS: Windows XP
Roadmaps: (Not assigned)    
Subscription  


 [2009-06-16 15:45 UTC] tsteven (Thomas Steven)
Description: ------------ I am using a stacked bar graph. If the graph has only one column, that column is given zero width. Test script: --------------- require_once('Image/Graph.php'); $Graph = & Image_Graph::factory('graph', array(500, 300)); $Graph->add( Image_Graph::vertical(Image_Graph::factory('title', rray('My way or the highway', 12)), Image_Graph::vertical( $Plotarea = Image_Graph::factory('plotarea'), $Legend = Image_Graph::factory('legend'), 90 ), 5 ) ); $Dataset1 =& Image_Graph::factory('dataset'); $Dataset1->addPoint('Jan', 1); //$Dataset1->addPoint('Feb', 1); //comment this in and it works $Dataset2 =& Image_Graph::factory('dataset'); $Dataset2->addPoint('Jan', 3); //$Dataset2->addPoint('Feb', 3); //comment this in and it works $Datasets = array($Dataset1,$Dataset2); $Plot =& $Plotarea->addNew('bar', array($Datasets,'stacked')); $Graph->done(); Expected result: ---------------- A single bar should have a minimum width. Actual result: -------------- A single bar is not visible, I assume that this is because it is zero width.

Comments