schau ich mir auf jeden fall an, aber ich würds scho gern mit jpgraph hinkriegen
bin immerhin schon nen schritt weitergekommen. den rest krieg ich auch noch hin .. und wenn ich den angeblichen string vorher in date umcasten muss
edit:
umcasten war ne gute idee.. nu funzt es
<?php
// JPGraph Library einbinden
include ("includes/jpgraph-2.1.4/src/jpgraph.php");
include ("includes/jpgraph-2.1.4/src/jpgraph_line.php");
include ("includes/jpgraph-2.1.4/src/jpgraph_date.php");
// Neuen Graph bilden
$graph = new Graph(600,400,"auto");
//get the db ready
error_reporting(E_ALL);
@mysql_connect($host, $dbuser, $dbpass) OR die(mysql_error());
mysql_select_db('darkorbit') OR die(mysql_error());
$sql = "SELECT Datum, (Kontostand/1000000) AS Kontostand
FROM kontostand
ORDER BY Datum;";
$result = mysql_query($sql) OR die(mysql_error());
//push the data into $data array to get it plotted
$i=0;
while ($array=mysql_fetch_array($result)) {
$datum[$i]= strtotime($array[0]);
$betrag[$i]=$array[1];
$i++;
};
// Grafik definieren...
$graph->SetScale("datint");
$lineplot =new LinePlot($betrag, $datum);
$lineplot->SetLegend('Kontostand');
$lineplot->value-> Show();
$graph->xaxis->SetLabelAngle(90);
$graph->SetMargin(40,40,30,130);
$graph->Add($lineplot);
// Graph ausgeben
$graph->Stroke();
?>
[/php]
*freus*