BarLabel() protected method

Text labels in or above the bar
protected BarLabel ( $value, &$bar, $offset_y = null )
 /**
  * Overridden to prevent drawing behind higher bars
  * $offset_y should be true for inner bars
  */
 protected function BarLabel(&$item, &$bar, $offset_y = null)
 {
     $font_size = $this->bar_label_font_size;
     $space = $this->bar_label_space;
     if ($offset_y) {
         // bar too small, would be above
         if ($bar['height'] < $font_size + 2 * $space) {
             return parent::BarLabel($item, $bar, ($bar['height'] + $font_size) / 2);
         }
         // option set to above
         if ($this->bar_label_position == 'above') {
             $this->bar_label_position = 'top';
             $label = parent::BarLabel($item, $bar);
             $this->bar_label_position = 'above';
             return $label;
         }
     }
     return parent::BarLabel($item, $bar);
 }