Fix graph.

This commit is contained in:
Alexis Lahouze 2015-06-13 16:28:48 +02:00
parent 4be249d67d
commit ea58e93f20

View File

@ -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]);