PEAR is archived and read-only

This mirror preserves historical PEAR package releases and metadata so existing references remain available.

Home » Images » Image_Graph » Bug #5607

X Axis Labels align to right

Details

Submitted2005-10-05 08:55 UTC
Frommarkhobden at gmail dot com
Assignednosey
StatusClosed
PackageImage_Graph
PHP Version5.0.5
OSFreeBSD
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());