예제 #1
0
 /**
     Constructor.
     @param string  $title      name of the panel.
     @param boolean $legendShow hide the legend or not
     @return object.
     **/
 public function __construct($title, $id = -1)
 {
     parent::__construct($title, 'singlestat', $id);
     $this->data['targets'] = array();
     $this->data['rangeMaps'] = array();
     $this->data['valueMaps'] = array();
 }
예제 #2
0
 /**
     Constructor.
     @param string  $title      name of the panel.
     @param boolean $legendShow hide the legend or not
     @return object.
     **/
 public function __construct($title, $legendShow = SHOW_LEGEND, $id = -1)
 {
     parent::__construct($title, 'graph', $id);
     $this->data['tooltip'] = array('show' => false, 'values' => false, 'min' => false, 'max' => false, 'current' => false, 'total' => false, 'avg' => false, 'shared' => true);
     $this->data['legend'] = array("show" => $legendShow, "values" => false, "min" => false, "max" => false, "current" => false, "total" => false, "avg" => false, "alignAsTable" => false, "rightSide" => false, "hideEmpty" => true);
     $this->data['fill'] = 0;
     $this->data['linewidth'] = 2;
     $this->data['targets'] = array();
     $this->data['seriesOverrides'] = array();
     $this->data['datasource'] = "-- Mixed --";
     $this->data['grid'] = array("threshold1" => null, "threshold1Color" => "rgba(216, 200, 27, 0.27)", "threshold2" => null, "threshold2Color" => "rgba(234, 112, 112, 0.22)");
     $this->data['yaxes'] = array(array('format' => 'short'), array('format' => 'short'));
 }