public function getUrl() { $this->scaleValues(); $this->setBarWidth(); $retStr = parent::concatUrl(); $retStr .= '&chbh=a'; return $retStr; }
public function getUrl() { $retStr = parent::getUrl(); if (!$this->no_labels) { $retStr .= "&chl=" . $this->encodeData($this->valueLabels, "", "|"); } return $retStr; }
/** * 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(); }
function chart() { $ds = new DataSet(null); $c = new GChart($ds, 300, 200); $c->render(); }
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