cvs: pear /Image_Graph/Graph/Axis Logarithmic.php

From: Date: Tue, 28 Feb 2006 22:11:59 +0000
Subject: cvs: pear /Image_Graph/Graph/Axis Logarithmic.php
Groups: php.pear.cvs 
Request: Send a blank email to pear-cvs+get-38753@lists.php.net to get a copy of this message
nosey Tue Feb 28 22:11:59 2006 UTC Modified files: /pear/Image_Graph/Graph/Axis Logarithmic.php Log: Fixed Request #5985 "Logarithmic Axis Minimum Value" http://cvs.php.net/viewcvs.cgi/pear/Image_Graph/Graph/Axis/Logarithmic.php?r1=1.13&r2=1.14&diff_format=u Index: pear/Image_Graph/Graph/Axis/Logarithmic.php diff -u pear/Image_Graph/Graph/Axis/Logarithmic.php:1.13 pear/Image_Graph/Graph/Axis/Logarithmic.php:1.14 --- pear/Image_Graph/Graph/Axis/Logarithmic.php:1.13 Sun Sep 25 17:52:17 2005 +++ pear/Image_Graph/Graph/Axis/Logarithmic.php Tue Feb 28 22:11:59 2006 @@ -24,7 +24,7 @@ * @author Jesper Veggerby <pear.nosey@veggerby.dk> * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 - * @version CVS: $Id: Logarithmic.php,v 1.13 2005/09/25 17:52:17 nosey Exp $ + * @version CVS: $Id: Logarithmic.php,v 1.14 2006/02/28 22:11:59 nosey Exp $ * @link http://pear.php.net/package/Image_Graph */ @@ -81,31 +81,6 @@ } /** - * Forces the minimum value of the axis. - * - * For an logarithimc axis this is always 0 - * - * @param double $minimum The minumum value to use on the axis - */ - function forceMinimum($minimum) - { - parent::forceMinimum(0); - } - - /** - * Gets the minimum value the axis will show. - * - * For an logarithimc axis this is always 0 - * - * @return double The minumum value - * @access private - */ - function _getMinimum() - { - return 0; - } - - /** * Preprocessor for values, ie for using logarithmic axis * * @param double $value The value to preprocess @@ -114,7 +89,7 @@ */ function _value($value) { - return log10($value); + return log10($value) - log10($this->_minimum); } /** @@ -148,7 +123,7 @@ return pow(10, $base+1); } - return 1; + return max(1, $this->_minimum); } /**

« previous php.pear.cvs (#38753) next »