diff --git a/morris.coffee b/morris.coffee index cfa245f..9094096 100644 --- a/morris.coffee +++ b/morris.coffee @@ -287,7 +287,7 @@ class window.Morris.Line # calculate a decimal-year value year + (timestamp - y1) / (y2 - y1); else - parseInt(d, 10) + parseInt(date, 10) # make long numbers prettier by inserting commas # eg: commas(1234567) -> '1,234,567' diff --git a/morris.js b/morris.js index ed82be8..19be20f 100644 --- a/morris.js +++ b/morris.js @@ -303,7 +303,7 @@ y2 = new Date(year + 1, 0, 1).getTime(); return year + (timestamp - y1) / (y2 - y1); } else { - return parseInt(d, 10); + return parseInt(date, 10); } };