using libchart

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • ragonz
    New Member
    • Jul 2008
    • 24

    using libchart

    i'm trying to create chart by using libchart. Here's my code

    Code:
    	include "libchart/classes/libchart.php";
    	
    	$chart= new VerticalBarChart(500,250);
    	
    	$dataSet = new XYDataSet();
    	$conn=OCILogon ("system", "kanjaktim");
    	$sql=OCIParse($conn,"select sto,sum(ano_pri) from rek_anomali group by sto");
    	OCIExecute($sql);
    	
    	while(OCIFetch($sql)){
    		$dataSet->addPoint(new Point(OCIResult($sql,1),OCIResult($sql,2)));
    	}
    	$chart->setDataSet($dataSet);
    	
    	$chart->setTitle("Jumlah Anomali per STO");
    	$chart->render("generated/demo1.png");
    but error message appear

    Warning: imagepng() [function.imagep ng]: Unable to open 'generated/demo1.png' for writing: No such file or directory in C:\Program Files\xampp\htd ocs\Wadm_Final\ libchart\classe s\view\plot\Plo t.php on line 256

    any suggestion to fix this error?

    regards..
  • ragonz
    New Member
    • Jul 2008
    • 24

    #2
    figured it out already... Thx ^^

    Comment

    Working...