protected function Bar($value, &$bar) { $x0 = $this->pad_left + $this->x0; $l1 = $this->ClampHorizontal($x0); $l2 = $this->ClampHorizontal($x0 + $value * $this->bar_unit_width); $bar['x'] = min($l1, $l2); $bar['width'] = abs($l1 - $l2); }