Re: pChart and Codeigniter
Hi all,
i was trying to get pChart work with Codeigniter..
Here are some stuff i did:
CLASS PDATA :
CLASS PIMAGE :
Code:
include('Pdraw.php');
class CI_Pimage extends CI_Pdraw
CLASS PDRAW :
i left everything as it is.
After this, on my controller :
Code:
$this->load->library('class/pdata');
$this->load->library('class/pimage');
$this->load->library('class/pdraw');
$PDA =& $this->pdata;
$PDB =& $this->pimage;
$PDA->addPoints(array(VOID,3,4,3,5));
$PDB->pImage(700,230, $PDA);
$PDB->setFontProperties(array("FontName"=>"../fonts/Forgotte.ttf","FontSize"=>11));
$PDB->setGraphArea(60,40,670,190);
$PDB->drawScale();
$PDB->drawSplineChart();
$PDB->stroke();
The result is that i have no errors, but i can't display the image. I was thinking this can be because of the font, but i am not sure of this.
I have tried to put the full path to the SetFontProperties, but with no acceptable results, it still gives me the symbol of the image broken. I think i have reached a good goal, but i am not able to go forward. Can someone help me with this trouble?
Thanks in advance,
Cristian Baldinu