Hej. Chciałem zrobić wykres przedstawiający ilość alarmów, jakie pojawiły się danego dnia, z każdego czujnika osobno. Wykres wygląda póki co tak:

Chciałbym, aby na osi X jako etykiety pojawiały się daty, w których miały miejsce następujące alarmy. Ponadto można określić, jaki przedział czasowy nas interesuje. Oto mój kod:
<?php
include("phpgraphlib.php");
//connection witch database
or
die('Brak połączenia z serwerem MySQL.<br />Błąd: '.mysql_error());or
die('Nie mogę połączyć się z bazą danych<br />Błąd: '.mysql_error());$graph= new PHPGraphLib(800,600);
//print_r($_GET);
//by GET i`m reading range of date
$from = $_GET['from'];
$to = $_GET['to'];
//from database i`m reading description for each alert
$sql = mysql_query('SELECT description FROM ALARM_DESCRIPTIONS;'); $p = 0;
$error[$p] = $row[0];
$p++;
}
//I`m reading date from MySQL
$k = 0;
while($k < count($error)){ $sql = "SELECT DATE(aei.date) as data,count(i.description) as liczba
FROM ...";
if($result){
$date = $row['data'];
$count = $row['liczba'];
$dataArray[$date] = $count;
}
}
$big[$k] = $dataArray;
$k++;
}
//because there is 10 types of alarms, I wanted to show every single in the picture, on the x-axis I wanted type which day, and on the y-axis how much alarms did we noticed during these day.
$graph->addData($big[0],$big[1],$big[2],$big[3],$big[4],
$big[5],$big[6],$big[7],$big[8],$big[9]);
$graph->setLineColor("#f30000","#ffff00","#05be00","#0062ff",
"#662c91","#a50b5e","#ffc0db","#ff6700","#62070b","#60742c");
$graph->setTitle("Ilosc alarmow dziennie");
$graph->setLegend(true);
$graph->setDataPointColor('red');
$graph->setBars(false);
$graph->setXValues(true);
$graph->setYValues(true);
$graph->setDataValues(true);
$graph->setLine(true);
$graph->setDataPoints(true);
$graph->createGraph();
?>
Z góry dziękuję za odpowiedź.