--- zabbix-2.0.4/frontends/php/include/classes/class.cchart.php.bk 2012-12-19 15:53:42.173531632 +0900 +++ zabbix-2.0.4/frontends/php/include/classes/class.cchart.php 2012-12-19 15:56:01.504553179 +0900 @@ -2264,6 +2264,8 @@ class CChart extends CGraphDraw { $maxX = $this->sizeX; // for each metric + $cell = ($this->to_time - $this->from_time) / $this->sizeX; + $cell_skip = ZBX_GRAPH_MAX_SKIP_CELL * $cell for ($item = 0; $item < $this->num; $item++) { $minY = $this->m_minY[$this->items[$item]['axisside']]; $maxY = $this->m_maxY[$this->items[$item]['axisside']]; @@ -2296,25 +2298,26 @@ class CChart extends CGraphDraw { // for each X $draw = true; $prevDraw = true; + $delay = $this->items[$item]['delay']; + $delay_skip = ZBX_GRAPH_MAX_SKIP_DELAY * $delay; for ($i = 1, $j = 0; $i < $maxX; $i++) { // new point if ($data['count'][$i] == 0 && $i != ($maxX - 1)) { continue; } $diff = abs($data['clock'][$i] - $data['clock'][$j]); - $cell = ($this->to_time - $this->from_time) / $this->sizeX; - $delay = $this->items[$item]['delay']; - - if ($cell > $delay) { - $draw = (boolean) ($diff < (ZBX_GRAPH_MAX_SKIP_CELL * $cell)); - } - else { - $draw = (boolean) ($diff < (ZBX_GRAPH_MAX_SKIP_DELAY * $delay)); - } if ($this->items[$item]['type'] == ITEM_TYPE_TRAPPER) { $draw = true; } + else{ + if ($cell > $delay) { + $draw = (boolean) ($diff < $cell_skip); + } + else { + $draw = (boolean) ($diff < $delay_skip); + } + } if (!$draw && !$prevDraw) { $draw = true;