diff --git a/src/modules/graph.coffee b/src/modules/graph.coffee index 2020c11..b5e2f6d 100644 --- a/src/modules/graph.coffee +++ b/src/modules/graph.coffee @@ -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 ]