Changeset trunk,188

Show
Ignore:
Timestamp:
03/09/10 20:11:58 (5 months ago)
Author:
Suren A. Chilingaryan <csa@dside.dyndns.org>
revision id:
csa@dside.dyndns.org-20100309201158-msaga9hcwnql0ref
branch-nick:
adei
Message:

Invalid labeling due substraction problems in case of narrow axes with big absolute values

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/classes/draw.php

    r174 r188  
    134134    if ($this->start !== false) { 
    135135        if ($value < $this->start) { 
    136             $value = dsMathPreciseSubstract($this->start, $value); 
     136            $value = dsMathPreciseSubstract((float)$this->start, $value); 
    137137            $format = $this->GetFormat($value, $value); 
    138138            return "{$this->start}\n" . sprintf("-$format", $value); 
    139139        } else { 
    140             $value = /*$value - $this->start;*/ dsMathPreciseSubstract($value, $this->start); 
     140            $value = /*$value - $this->start;*/ dsMathPreciseSubstract($value, (float)$this->start); 
    141141            $format = $this->GetFormat($value, $value); 
    142142            return "{$this->start}\n" . sprintf("+$format", $value);