fritz85: JPGraph & Jahresstatistik

Beitrag lesen

Hallo zusammen,

ich hab nun JPGraph installiert und auch schon erfolgreich mein erstes Balkendiagramm erstellt. Sieht wie folgt aus:

  
include ("src/jpgraph.php");  
include ("src/jpgraph_bar.php");  
  
$datay=array(12,8,19,3,10,5);  
  
$graph = new Graph(500,400,"auto");  
$graph->SetScale("textint");  
$graph->img->SetMargin(80,30,20,40);  
  
$datay=array(6000,5000,4000,3000,2000,1000);  
$bplot = new BarPlot($datay);  
  
$bplot->SetLegend("Umsätze");  
$daten2 = array(23,75,80,10);  
$bplot2 = new BarPlot($daten2);  
$bplot2->SetFillColor("chartreuse3");  
$bplot2->SetLegend("Abgänge");  
  
$graph->title->Set("Lust24 Umsatzstatistik");  
$graph->title->SetFont(FF_FONT1,FS_BOLD);  
$graph->yaxis->title->SetFont(FF_FONT1,FS_BOLD);  
$graph->xaxis->title->SetFont(FF_FONT1,FS_BOLD);  
  
$graph->SetShadow();  
$graph->Add($bplot);  
$graph->Stroke();

Nun möchte ich aber die Statistik mit meiner MySQL DB verbinden und eine Jahresstatitik erstellen. Als Anhaltspunkt habe ich in der Tabelle den Timestamp gespeichert anhand von dem kann ich ja den Monat ausfindig machen.

Jedoch fehlt mir jede Erfahrung mit JPGraph - hat jemand einen Tipp?

Gruss
fritz85