protected function Bar($value, &$bar)
{
$y = $this->height - $this->pad_bottom - $this->y0;
$l1 = $this->ClampVertical($y);
$l2 = $this->ClampVertical($y - $value * $this->bar_unit_height);
$bar['y'] = min($l1, $l2);
$bar['height'] = abs($l1 - $l2);
}