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

Bug #14486 bug of setlabelInterval
Submitted: 2008-08-11 04:33 UTC
From: nofish Assigned:
Status: Open Package: Image_Graph (version 0.7.2)
PHP Version: 5.2.6 OS: Windows XP
Roadmaps: (Not assigned)    
Subscription  


 [2008-08-11 04:33 UTC] nofish (No Fish)
Description: ------------ when the $x parameter of addpoint($x,$y) is string, setLabelInterval will not work very well. Test script: --------------- <?php require_once 'Image/Graph.php'; $Graph =& Image_Graph::factory('graph', array(250, 150)); $Graph->add( Image_Graph::vertical( $Plotarea = Image_Graph::factory('plotarea'),$Legend = Image_Graph::factory('legend'), 100),7); $Dataset1 =& Image_Graph::factory('dataset'); $Dataset1->addpoint('1/2', 2); $Dataset1->addpoint('1/3', 3); $Dataset1->addpoint('1/4', 6); $Dataset1->addpoint('1/5', 5); $Dataset1->addpoint('1/6', 4); //$Plotarea =& $Graph->addNew('plotarea', array('axis', 'axis')); $axis_x =& $Plotarea->getAxis(IMAGE_GRAPH_AXIS_X); $axis_x->setLabelInterval(2,3); $Plot1 =& $Plotarea->addNew('line', array(&$Dataset1)); $Plot1->setLineColor('red'); $Graph->done(); ?> Expected result: ---------------- 6 | | 4 | | 2 | | _ _ _ _ _ _ _ _ _ _ _ 1/4 1/5 Actual result: -------------- 6 | | 4 | | 2 | | _ _ _ _ _ _ _ _ _ _ _ 1/2 1/4 1/6

Comments