Last active
June 9, 2016 15:25
-
-
Save jlamim/45ae28295e7be1fcaf936f75f70709bc to your computer and use it in GitHub Desktop.
Gráficos com títulos (CodeIgniter + PHPlot)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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