Index: include/classes/graphdraw/CLineGraphDraw.php
===================================================================
--- include/classes/graphdraw/CLineGraphDraw.php	(revision 55576)
+++ include/classes/graphdraw/CLineGraphDraw.php	(working copy)
@@ -1832,6 +1832,8 @@
 
 		// item legend table header
 		$row = array(
+			array('text' => '', 'marginRight' => 0),
+			array('text' => '', 'marginRight' => 1),
 			array('text' => '', 'marginRight' => 5),
 			array('text' => ''),
 			array('text' => ''),
@@ -1882,18 +1884,24 @@
 				: $this->items[$i]['hostname'].NAME_DELIMITER.$this->items[$i]['name_expanded'];
 
 			// draw legend of an item with data
-			if (isset($data) && isset($data['min'])) {
+				if (isset($data) && isset($data['min'])) {
 				if ($this->items[$i]['axisside'] == GRAPH_YAXIS_SIDE_LEFT) {
 					$units['left'] = $this->items[$i]['units'];
+					$legend->addCell($rowNum, array('text' => '<', 'marginRight' => 0));
+					$legend->addCell($rowNum, array('image' => $colorSquare, 'marginRight' => 5));
+					$legend->addCell($rowNum, array('text' => ' ', 'marginRight' => 0));
 				}
 				else {
 					$units['right'] = $this->items[$i]['units'];
+					$legend->addCell($rowNum, array('text' => ' ', 'marginRight' => 0));
+					$legend->addCell($rowNum, array('image' => $colorSquare, 'marginRight' => 1));
+					$legend->addCell($rowNum, array('text' => '>', 'marginRight' => 5));
+					
 				}
-
-				$legend->addCell($rowNum, array('image' => $colorSquare, 'marginRight' => 5));
 				$legend->addCell($rowNum, array('text' => $itemCaption));
 				$legend->addCell($rowNum, array('text' => '['.$fncRealName.']'));
 				$legend->addCell($rowNum, array(
+
 					'text' => convert_units(array(
 						'value' => $this->getLastValue($i),
 						'units' => $this->items[$i]['units'],
@@ -1928,7 +1936,19 @@
 			}
 			// draw legend of an item without data
 			else {
-				$legend->addCell($rowNum, array('image' => $colorSquare, 'marginRight' => 5));
+				if ($this->items[$i]['axisside'] == GRAPH_YAXIS_SIDE_LEFT) {
+					$units['left'] = $this->items[$i]['units'];
+					$legend->addCell($rowNum, array('text' => '<', 'marginRight' => 0));
+					$legend->addCell($rowNum, array('image' => $colorSquare, 'marginRight' => 5));
+					$legend->addCell($rowNum, array('text' => ' ', 'marginRight' => 0));
+				}
+				else {
+					$units['right'] = $this->items[$i]['units'];
+					$legend->addCell($rowNum, array('text' => ' ', 'marginRight' => 0));
+					$legend->addCell($rowNum, array('image' => $colorSquare, 'marginRight' => 1));
+					$legend->addCell($rowNum, array('text' => '>', 'marginRight' => 5));
+					
+				}
 				$legend->addCell($rowNum, array('text' => $itemCaption));
 				$legend->addCell($rowNum, array('text' => '['._('no data').']'));
 			}
@@ -1971,22 +1991,26 @@
 						'units' => $units[$side]
 					));
 					$legend->addCell($rowNum, array(
-						'text' => $percentile['percent'].'th percentile: '.$convertedUnit.' ('.$side.')',
+						'text' => $percentile['percent'].'th percentile: '.$convertedUnit.'',
 						ITEM_CONVERT_NO_UNITS
 					));
 					if ($side == 'left') {
 						$color = $this->graphtheme['leftpercentilecolor'];
+						$leftXShiftMoveL = 5;
+						$leftXShiftMoveR = -5;
 					}
 					else {
 						$color = $this->graphtheme['rightpercentilecolor'];
+						$leftXShiftMoveL = -5;
+						$leftXShiftMoveR = 5;
 					}
 
 					imagefilledpolygon(
 						$this->im,
 						array(
-							$leftXShift + 5, $this->sizeY + $this->shiftY + 14 * $rowNum + $this->legendOffsetY,
-							$leftXShift - 5, $this->sizeY + $this->shiftY + 14 * $rowNum + $this->legendOffsetY,
-							$leftXShift, $this->sizeY + $this->shiftY + 14 * $rowNum + $this->legendOffsetY - 10
+							$leftXShift + $leftXShiftMoveL, $this->sizeY + $this->shiftY + 14 * $rowNum + $this->legendOffsetY - 10,
+							$leftXShift + $leftXShiftMoveL, $this->sizeY + $this->shiftY + 14 * $rowNum + $this->legendOffsetY,
+							$leftXShift + $leftXShiftMoveR, $this->sizeY + $this->shiftY + 14 * $rowNum + $this->legendOffsetY - 5
 						),
 						3,
 						$this->getColor($color)
@@ -1995,9 +2019,9 @@
 					imagepolygon(
 						$this->im,
 						array(
-							$leftXShift + 5, $this->sizeY + $this->shiftY + 14 * $rowNum + $this->legendOffsetY,
-							$leftXShift - 5, $this->sizeY + $this->shiftY + 14 * $rowNum + $this->legendOffsetY,
-							$leftXShift, $this->sizeY + $this->shiftY + 14 * $rowNum + $this->legendOffsetY - 10
+							$leftXShift + $leftXShiftMoveL, $this->sizeY + $this->shiftY + 14 * $rowNum + $this->legendOffsetY - 10,
+							$leftXShift + $leftXShiftMoveL, $this->sizeY + $this->shiftY + 14 * $rowNum + $this->legendOffsetY,
+							$leftXShift + $leftXShiftMoveR, $this->sizeY + $this->shiftY + 14 * $rowNum + $this->legendOffsetY - 5
 						),
 						3,
 						$this->getColor('Black No Alpha')
 
