Last active
June 9, 2016 15:25
-
-
Save jlamim/9d66e3f7d675957199d29b19ef84f242 to your computer and use it in GitHub Desktop.
Gráfico simples com CodeIgniter e 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 Index(){ | |
// Carregamos a library PHPlot | |
$this->load->library('PHPlot'); | |
//Definindo os dados do gráfico | |
$dados = array( | |
array('a',3), | |
array('b',5), | |
array('c',7), | |
array('d',8), | |
array('e',2), | |
array('f',6), | |
array('g',7) | |
); | |
$this->phplot->SetDataValues($dados); | |
//Imprimindo 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