I how do i calculate trendline/slop in c# for a time series data this is the general formula slope = (y1-y2)/(x1-x2) my data looks like this
DateTime Value
10/5/2016 14:50 45
10/5/2016 15:10 50
10/5/2016 15:20 53
10/5/2016 15:30 60
I looked at this like for reference but I am not able understand how time will be computed? How do I calculate a trendline for a graph?