Changeset 45 for trunk/Application/View/Graph.php
- Timestamp:
- Nov 24, 2009, 6:01:08 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Application/View/Graph.php
r43 r45 37 37 $Measure->Differential = $this->Config['Application']['DefaultVariables']['Differential']; 38 38 $Measure->Debug = $Debug; 39 $DbResult2 = $this->Database->select('MeasureMethod', '*', 'Id='.$Measure->Data['Method']); 40 $MeasureMethod = $DbResult2->fetch_assoc(); 39 41 40 42 $FontSize = $this->Config['Application']['FontSize']; … … 177 179 $Y = $Height - 1 - ($VerticalLinesDistance * $I); 178 180 //$Y = $Height - 1 - ($VerticalLinesDistance * $I / ($MaxValue - $MinValue) * $this->Config['Application']['ValueToImageHeigthCoefficient'] * $Height); 179 $Text = $this->System->AddPrefixMultipliers(round(($I * $VerticalLinesDistance / $Height / $this->Config['Application']['ValueToImageHeigthCoefficient'] * ($MaxValue - $MinValue) + $MinValue)), $Measure ->Data['Unit'], 3);181 $Text = $this->System->AddPrefixMultipliers(round(($I * $VerticalLinesDistance / $Height / $this->Config['Application']['ValueToImageHeigthCoefficient'] * ($MaxValue - $MinValue) + $MinValue)), $MeasureMethod['Unit'], 3); 180 182 $BoundBox = imagettfbbox($FontSize, 0, $FontFile, $Text); 181 183 if(($Y - ($BoundBox[5] - $BoundBox[1]) / 2) > 10) … … 185 187 186 188 $Left = $Width - 10; 187 $Text = ' Max. '.$this->System->AddPrefixMultipliers($MaxValue, $Measure ->Data['Unit']);189 $Text = ' Max. '.$this->System->AddPrefixMultipliers($MaxValue, $MeasureMethod['Unit']); 188 190 $BoundingBox = imagettfbbox($FontSize, 0, $FontFile, $Text); 189 191 $Left -= ($BoundingBox[2] - $BoundingBox[0]); 190 192 imagettftext($Image, $FontSize, 0, $Left, 14, $Red, $FontFile, $Text); 191 193 192 $Text = ' Avg. '.$this->System->AddPrefixMultipliers($AvgValue, $Measure ->Data['Unit']);194 $Text = ' Avg. '.$this->System->AddPrefixMultipliers($AvgValue, $MeasureMethod['Unit']); 193 195 $BoundingBox = imagettfbbox($FontSize, 0, $FontFile, $Text); 194 196 $Left -= ($BoundingBox[2] - $BoundingBox[0]); 195 197 imagettftext($Image, $FontSize, 0, $Left, 14, $Green, $FontFile, $Text); 196 198 197 $Text = ' Min. '.$this->System->AddPrefixMultipliers($MinValue, $Measure ->Data['Unit']);199 $Text = ' Min. '.$this->System->AddPrefixMultipliers($MinValue, $MeasureMethod['Unit']); 198 200 $BoundingBox = imagettfbbox($FontSize, 0, $FontFile, $Text); 199 201 $Left -= ($BoundingBox[2] - $BoundingBox[0]);
Note:
See TracChangeset
for help on using the changeset viewer.