Hello, I have a problem with my axisX :
I do this:`axisX:{
suffix: “h”,
minimum: -1,
maximum: 24
},`
And I use a query for the data points :
echo 'dataPoints: [',"\n";
while ($row = mysqli_fetch_array($query)){
$statut=$row['AVG(statut)'];
$heure=$row['heure'];
echo '{label:'.$heure.',y:'.$statut.'},';
echo "\n";
}
echo ' ]',"\n";
I want the $statut for every hour of one day, so 24 values. But sometimes in my database, there is no hours in the middle of the day, I want to write a value of 0 for those hours which are not in the database. So I need an axis with 24 graduations and some blanks where there is no value.
Now I’ve got an axis with the hours of the days where $statut is not null. So there is not 24 graduations. And the axis put the value of my data and it get back to 0 after, its like this:
1h-8h-16h-22h-8h-10h-12h-14h-16h-18h-20h-22h-24h
Maybe it will be clear with pictures but I didn’t find how to import screenshots here.
Thanks and sorry for my english.