Hi,
I am trying to do is create a graph, taking the input from a text file.
and I am getting the following JPGraph error when I trying to load my graph.
"Cannnot use autoscaling since it is impossible to determine a valid min/max value of the Y-axis (only null values)."
<?php
include ("src/jpgraph.php");
include ("src/jpgraph_line.php");
//read info from stats.txt containing cpu utilization stats, (each line in text //document containes % cpu utilization)
$handle = fopen("stats.txt", "r");
while (!feof($handle)) {
$cpuinfo = fscanf($handle, "%s");
if ($cpuinfo) {
list ($cpu) = $cpuinfo;
$ydata = array($cpuinfo);
// Graph Size
$graph = new Graph(750,250,"auto");
$graph->SetScale("textlin");
// Create the linear plot
$lineplot=new LinePlot($ydata);
$lineplot->SetColor("blue");
// Add the plot to the graph
$graph->Add($lineplot);
// Display the graph
$graph->Stroke();
}
$cpuinfo=NULL;
}
fclose($handle);
?>
Any ideas folks