i am using these codes to generate linear graph from mysql...
<?php
ini_set('display_errors', 1);
error_reporting(E_ALL);
session_start();
//if(isset($_SESSION['user'])) {
//function generateGraph(){
include('connectsml.php');
//include('jpgraph/src/jpgraph.php');
//include('jpgraph/src/jpgraph_bar.php');
include ('jpgraph/src/jpgraph_line.php');
include ('jpgraph/src/jpgraph_log.php');
//dapatkan nama ladang;
$ldgcode=$_POST['ldgcode'];
$year=$_POST['year'];
$sqllsblock="select * from ladang where ldgcode='$ldgcode' order by block";
$reslsblock=mysql_query($sqllsblock);
if ($rowlsblock=mysql_fetch_array($reslsblock)){
do{
$data[] = $result['yield'];
$y2data[] = $result['month'];
}while ($rowlsblock=mysql_fetch_array($reslblock));
}
$graph = new Graph(700,300);
$graph->SetScale("textlin");
$graph->img->SetMargin(40,40,20,70);
$graph->AdjBackgroundImage(0.4,0.7,-1);
$graph->SetShadow();
//titles n layout
$graph ->title->Set("Penghasilan BTS Mengikut Blok Dalam Setahun" );
$graph ->xaxis->title->SetFont(FF_FONT1,FS_BOLD);
$graph ->xaxis->title->Set("Bulan");
$graph ->xgrid->Show(true,false);
$graph ->xaxis->SetTextTickInterval(3);
$graph ->yaxis->SetColor("blue");
$graph ->yaxis->SetWeight("1");
$graph ->yaxis->title->Set("Penghasilan");
$graph ->yaxis->title->SetFont(FF_FONT1,FS_BOLD);
$graph ->yaxis->scale->ticks->SupressFirst();
$graph ->SetShadow();
$graph ->legend->SetLayout(LEGEND_HOR);
$graph ->legend->Pos(.5,.90,"center","center");
$graph ->ygrid->Show(true,false);
//Create linear graph for weight
$lineplot = new LinePlot($data);
$lineplot ->SetColor("blue");
$lineplot ->mark->SetColor("blue");
$lineplot ->SetWeight("2");
$lineplot ->SetLegend("Penghasilan");
//Create linear graph for month
$graph ->SetY2Scale("lin");
$lineplot2 = new LinePlot($y2data);
$lineplot2->SetColor("red");
$lineplot2 ->mark->SetColor("red");
$lineplot2->SetWeight(2);
$lineplot2 ->SetLegend("Bulan");
$graph ->y2axis->SetColor("red");
$graph ->y2grid->Show(true,false);
//Draw the graphs
$graph->Add($lineplot);
$graph->title->Set("Penghasilan BTS Mengikut Blok Dalam Setahun");
$graph->xaxis->title->Set("Bulan");
$graph->yaxis->title->Set("Penghasilan");
$graph->Stroke();
?>
but i got this error:
Fatal error: Class 'Plot' not found in C:\xampp\htdocs\public\jpgraph\src\jpgraph_line.php on line 25
anyone can help me?