trendline accounting for today
This commit is contained in:
parent
c8e91be427
commit
7d209034e3
|
@ -79,6 +79,10 @@ module.exports =
|
|||
'trendline': (actual, created_at, due_on) ->
|
||||
start = +actual[0].date
|
||||
|
||||
# Now is an actual point too.
|
||||
last = actual[actual.length - 1]
|
||||
actual.push { 'date': new Date(), 'points': last.points }
|
||||
|
||||
values = _.map actual, ({ date, points }) ->
|
||||
[ +date - start, points ]
|
||||
|
||||
|
|
Loading…
Reference in New Issue