Home » Images » Image_Graph » Bug #5602
setlabelInterval to
Details
| Submitted | 2005-10-04 14:30 UTC |
|---|---|
| From | junior at akabativas dot com dot br |
| Assigned | nosey |
| Status | Closed |
| Package | Image_Graph |
| PHP Version | 5.0.4 |
| OS | Linux - Fedora Core 3 |
| Roadmaps | (Not assigned) |
Comments
[2005-10-04 14:30 UTC] junior at akabativas dot com dot br
Description:
------------
#pear list
Installed packages:
===================
Package Version State
Archive_Tar 1.1 stable
Console_Getopt 1.2 stable
DB_Sqlite_Tools 0.1.3 alpha
Image_Canvas 0.2.1 alpha
Image_Color 1.0.1 stable
Image_Graph 0.7.0 alpha
Log 1.8.7 stable
Numbers_Roman 1.0.1 beta
Numbers_Words 0.13.1 beta
PEAR 1.3.3 stable
XML_RPC 1.1.0 stable
Error:
//does not work:
$AxisX =& $Plotarea->getAxis('x');
$AxisX->setLabelInterval(array(8, 18, 28));
Test script:
---------------
<?php
require_once 'Image/Graph.php';
$Graph =& Image_Graph::factory('graph', array(500, 200));
$Font =& $Graph->addNew('font', 'Verdana');
$Font->setSize(8);
$Graph->setFont($Font);
$Plotarea =& $Graph->addNew('plotarea');
$Dataset =& Image_Graph::factory('dataset');
$Dataset->addPoint(10,10);
$Dataset->addPoint(20,20);
$Dataset->addPoint(30,30);
$Dataset->addPoint(40,40);
$Plot =& $Plotarea->addNew('line', array(&$Dataset));
$LineStyle =& Image_Graph::factory('Image_Graph_Line_Dashed', array('red', 'transparent'));
$Plot->setLineStyle($LineStyle);
//that is ok
$AxisY =& $Plotarea->getAxis('y');
$AxisY->setLabelInterval(array(7, 17, 27));
//does not work
$AxisX =& $Plotarea->getAxis('x');
$AxisX->setLabelInterval(array(8, 18, 28));
$Graph->done();
?>
Expected result:
----------------
27 |
|
17 |
|
7 |
|
_ _ _ _ _ _ _ _ _ _ _
8 18 28
Actual result:
--------------
27 |
|
17 |
|
7 |
|
_ _ _ _ _ _ _ _ _ _ _