Skip to content

Instantly share code, notes, and snippets.

@jlamim
Last active June 9, 2016 15:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jlamim/45ae28295e7be1fcaf936f75f70709bc to your computer and use it in GitHub Desktop.
Save jlamim/45ae28295e7be1fcaf936f75f70709bc to your computer and use it in GitHub Desktop.
Gráficos com títulos (CodeIgniter + PHPlot)
public function Comtitulos()
{
$this->load->library('PHPlot');
//Define os títulos
$this->phplot->SetTitle("Titulo do Grafico");
$this->phplot->SetXTitle('Eixo X');
$this->phplot->SetYTitle('Eixo Y');
//Define os valores para geração do gráfico
$dados = array(
array('a',3,4,2),
array('b',5,9,1),
array('c',7,2,6),
array('d',8,1,4),
array('e',2,8,6),
array('f',6,4,5),
array('g',7,2,3)
);
$this->phplot->SetDataValues($dados);
//Imprime o gráfico na tela
$this->phplot->DrawGraph();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment