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

Bug #6919 Isolated points in linegraphs with breaks drawn incorrectly
Submitted: 2006-02-24 08:20 UTC
From: dsier at g-point dot biz Assigned: nosey
Status: Closed Package: Image_Graph (version CVS)
PHP Version: 5.0.5 OS:
Roadmaps: (Not assigned)    
Subscription  


 [2006-02-24 08:20 UTC] dsier at g-point dot biz (Darek Sieradzki)
Description: ------------ Isolated point in line graphs with breaks creates single vertex which is not used in polygon (polygons are drawn only when $numPoints > 1). If after that script starts to draw polygon based markers (triangle, circle, etc.) this single vertex is prepended to the first marker and additional line or filled area is drawn. This applies at least to GD Canvas. Test script: --------------- <?php require_once 'Image/Graph.php'; $Graph =& Image_Graph::factory('graph', array(400, 300)); $Font =& $Graph->addNew('font', 'Verdana'); $Font->setSize(10); $Graph->setFont($Font); $Graph->add( Image_Graph::vertical( Image_Graph::factory('title', array('Data \'Break\' Sample', 12)), Image_Graph::vertical( Image_Graph::vertical( $Plotarea1 = Image_Graph::factory('plotarea'), $Plotarea2 = Image_Graph::factory('plotarea'), 50 ), $Legend = Image_Graph::factory('legend'), 88 ), 5 ) ); $Legend->setPlotarea($Plotarea1); $Legend->setPlotarea($Plotarea2); $Dataset =& Image_Graph::factory('dataset'); $Dataset->addPoint('Jan', 10); $Dataset->addPoint('Feb', 12); $Dataset->addPoint('Mar', 3); $Dataset->addPoint('Apr', null); $Dataset->addPoint('May', 4); $Dataset->addPoint('Jun', 10); $Dataset->addPoint('Jul', null); $Dataset->addPoint('Aug', null); $Dataset->addPoint('Sep', 9); $Dataset->addPoint('Oct', 10); $Dataset->addPoint('Nov', null); $Dataset->addPoint('Dec', 14); $Marker1 =& Image_Graph::factory('Image_Graph_Marker_Circle'); $Plot1 =& $Plotarea1->addNew('line', array(&$Dataset)); $Plot1->setLineColor('red'); $Plot1->setMarker($Marker1); $Marker2 =& Image_Graph::factory('Image_Graph_Marker_Box'); $Plot2 =& $Plotarea2->addNew('line', array(&$Dataset)); $Plot2->setLineColor('red'); $Plot2->setMarker($Marker2); $Graph->done(); ?> Expected result: ---------------- Top graph shows error - additional line between first and last marker. Actual result: -------------- Lower graph shows good behaviour using another, not polygon based marker.

Comments

 [2006-02-24 08:25 UTC] dsier at g-point dot biz
fixed bug summary
 [2006-02-28 22:31 UTC] User who submitted this comment has not confirmed identity
If you submitted this note, check your email.If you do not have a message, click here to re-send
MANUAL CONFIRMATION IS NOT POSSIBLE.  Write a message to pear-dev@lists.php.net
to request the confirmation link.  All bugs/comments/patches associated with this

email address will be deleted within 48 hours if the account request is not confirmed!