Problem mit JPGraph

Sichtbarer

Grünschnabel
Hi @ all,

ich hab derzeit ein Problem mit JPGraph.
Mein Ziel ist es, mittels Daten aus einer Datenbank eine Kurve zu zeichnen (wie z.b. hier)

Ich hab die Datei etwas abgeändert, sie schaut nun folgendermaßen aus:

PHP:
<?php
include ("graph/jpgraph.php");
include ("graph/jpgraph_line.php");


$eptas = "1,2,4,5,6,3,6,7,5";
$ydata = array($eptas);

// Create the graph. These two calls are always required
$graph = new Graph(500,300,"auto");
$graph->SetScale("textlin",0,20);

// Create the linear plot
$lineplot=new LinePlot($ydata);
$lineplot->mark->SetType(MARK_UTRIANGLE);

// Add the plot to the graph
$graph->Add($lineplot);

$graph->img->SetMargin(40,20,20,40);
$graph->title->Set("Statistik fuer ...");
$graph->xaxis->title->Set("Spiele");
$graph->yaxis->title->Set("Platzierung	");

$graph->title->SetFont(FF_FONT1,FS_BOLD);
$graph->yaxis->title->SetFont(FF_FONT1,FS_BOLD);
$graph->xaxis->title->SetFont(FF_FONT1,FS_BOLD);

$lineplot->SetColor("blue");
$lineplot->SetWeight(2);
$graph->yaxis->SetColor("red");
$graph->yaxis->SetWeight(2);
$graph->SetShadow();

// Display the graph
$graph->Stroke();
?>

Es kommt allerdings nur die Fehlermeldung:
A plot has an illegal scale. This could for example be that you are trying to use text auto scaling to draw a line plot with only one point or that the plot area is too small. It could also be that no input data value is numeric (perhaps only ´-´ or ´x´)

Kann mir einer weiterhelfen?
 

Neue Beiträge

Zurück