コード例 #1
0
 /**
  * Sets up values array
  */
 public function Values($values)
 {
     parent::Values($values);
     if (!$this->values->error) {
         $this->multi_graph = new MultiGraph($this->values, $this->force_assoc, $this->datetime_keys, $this->require_integer_keys);
     }
 }
コード例 #2
0
 /**
  * Sets up values array
  */
 public function Values($values)
 {
     if (!$this->scatter_2d) {
         return parent::Values($values);
     }
     $this->values = array();
     $v = func_get_args();
     if (count($v) == 1) {
         $v = $v[0];
     }
     if (is_array($v) && isset($v[0]) && is_array($v[0]) && is_array($v[0][0])) {
         $this->values = $v;
     } elseif (is_array($v) && isset($v[0]) && is_array($v[0])) {
         $this->values[0] = $v;
     } else {
         throw new Exception('Scatter 2D mode requires array of array(x,y) points');
     }
 }
コード例 #3
0
 /**
  * Sets up values array
  */
 public function Values($values)
 {
     if (!$this->scatter_2d) {
         parent::Values($values);
     } else {
         $this->values = array();
         $v = func_get_args();
         if (count($v) == 1) {
             $v = $v[0];
         }
         if (is_array($v) && isset($v[0]) && is_array($v[0]) && is_array($v[0][0])) {
             $this->values = $v;
         } elseif (is_array($v) && isset($v[0]) && is_array($v[0])) {
             $this->values[0] = $v;
         } else {
             throw new Exception('Scatter 2D mode requires array of array(x,y) points');
         }
     }
     $this->multi_graph = new MultiGraph($this->values, $this->force_assoc);
 }
コード例 #4
0
 /**
  * construct multigraph
  */
 public function Values($values)
 {
     parent::Values($values);
     $this->multi_graph = new MultiGraph($this->values, $this->force_assoc);
 }