The post on calculating trend lines on a scatter plot (http://stackoverflow.com/questions/43224/how-do-i-calculate-a-trendline-for-a-graph) is quite helpful, but I'm curious how one could go about finding a trend line on a graph where the x-axis is a DateTime field, rather than an integer. For example, consider the case of charting the number of subscribers to a mailing list over time:
Jan 1: 100 subscribers
Jan 2: 105 subscribers
Jan 5: 120 subscribers
Jan 10: 117 subscribers
etc...
The problem I'm running into is figuring out the 'run' (delta x) portion of this... since the intervals are not going to be evenly spaced, we can't just assume a single unit of time passing between each measurement. I've got a hunch that I'll have to work out some sort of scale, but I'm stuck there.
Can anyone explain how to calculate a trendline when the x-axis is a DateTime field? (If you post a code sample, C#, VB.NET, or Java would be most appreciated!)