Home » Images » Image_Graph » Bug #5607
X Axis Labels align to right
Details
| Submitted | 2005-10-05 08:55 UTC |
|---|---|
| From | markhobden at gmail dot com |
| Assigned | nosey |
| Status | Closed |
| Package | Image_Graph |
| PHP Version | 5.0.5 |
| OS | FreeBSD |
| Roadmaps | (Not assigned) |
Comments
[2005-10-05 08:55 UTC] markhobden at gmail dot com
Description:
------------
X Axis titles align to the right since version 0.6.0.
Here is an example of it happening:
http://pear.veggerby.dk/samples/samples/output/secondary_axis.png
The included patch seems to fix the problem for me.
Thank-you.
Mark
Test script:
---------------
Index: Axis.php
===================================================================
--- Axis.php (revision 360)
+++ Axis.php (working copy)
@@ -1396,7 +1396,7 @@
$this->_canvas->line($data);
if ($this->_title) {
- if ($this->_transpose) {
+ if (!$this->_transpose) {
$y = $this->_bottom;
$x = $this->_left + $this->width() / 2;
$this->write($x, $y, $this->_title, IMAGE_GRAPH_ALIGN_CENTER_X + IMAGE_GRAPH_ALIGN_BOTTOM, $this->_getTitleFont());