コード例 #1
0
ファイル: Series.php プロジェクト: malwarebytes/altamira
 /**
  * Set the labels to be used for this series in the JsWriter
  * @param array $labels all strings
  * @return \Altamira\Series provides fluent interface
  */
 public function useLabels($labels = array())
 {
     if ($this->jsWriter instanceof \Altamira\JsWriter\Ability\Labelable) {
         $this->jsWriter->useSeriesLabels($this->getTitle(), $labels);
     }
     for ($i = 0; $i < count($labels) && $i < count($this->data); $i++) {
         $this->data[$i]->setLabel($labels[$i]);
     }
     return $this;
 }