From ea58e93f20580fc8e382874fd87f93be8941df3a Mon Sep 17 00:00:00 2001 From: Alexis Lahouze Date: Sat, 13 Jun 2015 16:28:48 +0200 Subject: [PATCH] Fix graph. --- accountant/frontend/static/js/entries.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/accountant/frontend/static/js/entries.js b/accountant/frontend/static/js/entries.js index 13161ce..317d6c9 100644 --- a/accountant/frontend/static/js/entries.js +++ b/accountant/frontend/static/js/entries.js @@ -383,7 +383,7 @@ var EntryController = function($scope, $http, $rootScope, $filter) { var lastDate = moment(entries[entries.length - 1][0]).add(1, 'day').format(); var chart = nv.models.lineChart().options({ - x: function(d) { return d3.time.format.utc(d[0]); }, + x: function(d) { return new Date(d[0]); }, y: function(d) { return new Number(d[1]); }, transitionDuration: 250, showXAxis: true, @@ -397,7 +397,7 @@ var EntryController = function($scope, $http, $rootScope, $filter) { chart.xAxis .axisLabel("Date") .tickFormat(function(d) { - return d3.time.format.iso(new Date(d)); + return d3.time.format("%x")(new Date(d)); }); //chart.xAxis.scale().range([firstDate, lastDate]);