Commit 44eb6b3e3b65e8416bd49461460f1fe3e233e6c0

Authored by Guillaume
1 parent 57e1fe6c

Test Graphe

Showing 1 changed file with 2 additions and 6 deletions   Show diff stats
site/graphe.php
... ... @@ -6,13 +6,9 @@ require_once('accesBase.php');
6 6 $history = getHistory($_REQUEST['nom'], '', '', $_REQUEST['start'], $_REQUEST['end'], $_REQUEST['nombre']);
7 7 $y = makeArray($history, "value");
8 8 $x = makeArray($history, "date");
9   -//str_replace(" ", "\n", $datax);
10 9  
11   -for(int i=0; i<count($y); i++)
12   -{
13   - $datay[] = $y[count($y)-i-1];
14   - $datax[] = $x[count($y)-i-1];
15   -}
  10 +$datay = array_reverse($y);
  11 +$datax = array_reverse($x);
16 12  
17 13 // Setup the graph
18 14 $graph = new Graph(800,400);
... ...