I run into this problem again and again;
Situation
there is a (large) dataset with records tied to a date (or even time) and I have the need to plot this data over time.
Problem
The dataset only contains the dates for which there are records available (obviously), but I need also the ’empty’ dates to be able to plot multiple series evenly over time.
Tools
I usually work with MySQL and PHP, most often pasting the data into Excel to plot graphs etc.
Workaround
Up till this moment I usually create an excel sheet and put in the dates by hand and determine the appropriate number of results with a SumIf on the dataset.
This seems a bit stupid to me though, and isn’t really workable when working with a lot of records (excel gets really REALLY slow quite quickly).
I’m really curious to see if there isn’t a ‘real’ and better solution to do this, maybe already in the construction of the query?
Are dates in you excel data text that look like dates, or date serial numbers formatted to display as dates?
If the date data points are date serial numbers then the plot will space the X axis evenly over time irrespective of interval between individual data points
The attached image demontrates: the first column and plot are “Dates” stored as text, the second date serial numbers formatted as dates