diff --git a/site/graphe.php b/site/graphe.php index 26ec3fd..f6741fb 100644 --- a/site/graphe.php +++ b/site/graphe.php @@ -4,18 +4,7 @@ require_once ('jpgraph/jpgraph_line.php'); require_once('accesBase.php'); $history = getHistory($_REQUEST['nom'], '', '', $_REQUEST['start'], $_REQUEST['end'], $_REQUEST['nombre']); -$datay1 = makeArray($history, "value"); -$absc = makeArray($history, "value"); - -//$history2 = getHistory('Atmos', '', '', '2020-01-02 00:00:00', '2020-04-05 23:59:59', 4); -//$datay2 = makeArray($history2, "value"); - -//$history3 = getHistory('Fusion', '', '', '2020-01-02 00:00:00', '2020-04-05 23:59:59', 4); -//$datay3 = makeArray($history3, "value"); - -//$datay1 = array(20,15,23,15); -//$datay2 = array(12,9,42,8); -//$datay3 = array(5,17,32,24); +$datay = makeArray($history, "value"); // Setup the graph $graph = new Graph(800,400); @@ -25,7 +14,7 @@ $theme_class=new UniversalTheme; $graph->SetTheme($theme_class); $graph->img->SetAntiAliasing(false); -$graph->title->Set('Graphique'); +$graph->title->Set('Filled Y-grid'); $graph->SetBox(false); $graph->SetMargin(40,20,36,63); @@ -38,14 +27,14 @@ $graph->yaxis->HideTicks(false,false); $graph->xgrid->Show(); $graph->xgrid->SetLineStyle("solid"); -$graph->xaxis->SetTickLabels(Array('A', 'B', 'C', 'D')); +$graph->xaxis->SetTickLabels(array('A','B','C','D')); $graph->xgrid->SetColor('#E3E3E3'); // Create the first line $p = new LinePlot($datay); $graph->Add($p); $p->SetColor("#6495ED"); -$p->SetLegend('Line 1'); +$p->SetLegend('Capteur'); $graph->legend->SetFrameWeight(1); -- libgit2 0.21.2