Hi guys,
I'm trying to have this result in an apex chart, where I show the hourly energy consumption with this simple query in MYSQL:
SELECT Arc1_kWh
FROM energy
WHERE DATE(t_stamp) = DATE(:Day)
Obviously if I show a past day all the chart is full with the 24 hours, but if I show the chart of the actual day, the query doesn't return 24 rows but less and the result is that the xaxis of the chart if full but not with the 24 hours. I would like to have the empty space where I don't have the data available.
Here is how is now, with all the chart full even with no 24 rows
Here is how I would like to have it
To make it work I just add some empty rows with no value set.
The question is: how can I add automatically the empty values missing?