Пример #1
0
 /**
  * Returns the style options for the inner text label
  */
 public function DataLabelStyle($dataset, $index, &$item)
 {
     $style = parent::DataLabelStyle($dataset, $index, $item);
     if ($dataset !== 'innertext') {
         return $style;
     }
     // label settings can override global settings
     $opts = array('font' => 'inner_text_font', 'font_size' => 'inner_text_font_size', 'font_weight' => 'inner_text_font_weight', 'font_adjust' => 'inner_text_font_adjust', 'colour' => 'inner_text_colour', 'back_colour' => 'inner_text_back_colour');
     foreach ($opts as $key => $opt) {
         if (isset($this->settings[$opt]) && !empty($this->settings[$opt])) {
             $style[$key] = $this->settings[$opt];
         }
     }
     // no boxes
     $style['type'] = 'plain';
     return $style;
 }