コード例 #1
0
ファイル: bar.php プロジェクト: enormego/EightPHP
 public function getUrl()
 {
     $this->scaleValues();
     $this->setBarWidth();
     $retStr = parent::concatUrl();
     $retStr .= '&chbh=a';
     return $retStr;
 }
コード例 #2
0
ファイル: pie.php プロジェクト: enormego/EightPHP
 public function getUrl()
 {
     $retStr = parent::getUrl();
     if (!$this->no_labels) {
         $retStr .= "&chl=" . $this->encodeData($this->valueLabels, "", "|");
     }
     return $retStr;
 }
コード例 #3
0
ファイル: builtinrenderer.php プロジェクト: madseller/coperio
 /**
  * Method to render a statistical chart using built-in image.
  *
  * @return false if someting wrong
  */
 function render()
 {
     jincimport("graphics.gchart");
     jincimport("graphics.gimage");
     $chart = new GChart($this->get('legend'), 700, 200);
     $chart->addLine($this->get('values'));
     $chart->setXMargin(25);
     $chart->setYMargin(25);
     $chart->setGridColor(192, 192, 192);
     $c = new GImage(750, 250);
     $c->display($chart);
     $c->close();
 }
コード例 #4
0
ファイル: default.php プロジェクト: noccy80/lepton-ng
 function chart()
 {
     $ds = new DataSet(null);
     $c = new GChart($ds, 300, 200);
     $c->render();
 }
コード例 #5
0
ファイル: gchart.php プロジェクト: neves/php
        return "http://chart.apis.google.com/chart?" . $this->parametros();
    }
    public function img()
    {
        return sprintf('<img src="%s" />', $this->url());
    }
    public function parametros()
    {
        $atributos = array();
        foreach ($this->atributos as $atributo => $valor) {
            $atributos[] = "{$atributo}=" . urlencode(utf8_encode($valor));
        }
        return implode("&", $atributos);
    }
}
$chart = new GChart();
$chart->setDados(array("php" => 150, "java" => -15, "ruby" => 75));
$chart->setColors("FF0000");
$chart->cht = "bvs";
$chart->chxt = "y,x,r";
$chart->chxl = "0:-100,100";
echo $chart->img();
echo urldecode($chart->parametros());
/*
LINE
	lc chart
	ls spark
	lxy duas linhas
BAR
	bhs barra horizontal
	bcs barra vertical