Skip to content

Commit

Permalink
Fix date axis rendering in jqPlot
Browse files Browse the repository at this point in the history
  • Loading branch information
pingswept authored and root committed Dec 18, 2012
1 parent 55aa06f commit 3ebee21
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions public/static/js/jqplot-plugins/jqplot.dateAxisRenderer.js
Expand Up @@ -480,9 +480,11 @@
var tempti = ret[0];
this._autoFormatString = ret[1];

min = Math.floor(min/tempti) * tempti;
// https://bitbucket.org/cleonello/jqplot/pull-request/24/added-suggested-fix-in-comment-8-for-issue/diff
// min = Math.floor(min/tempti) * tempti;
min = new $.jsDate(min);
min = min.getTime() + min.getUtcOffset();
min = Math.floor((min.getTime() - min.getUtcOffset())/tempti) * tempti + min.getUtcOffset();
// min = min.getTime() + min.getUtcOffset();

nttarget = Math.ceil((max - min) / tempti) + 1;
this.min = min;
Expand Down Expand Up @@ -734,4 +736,3 @@
};

})(jQuery);

0 comments on commit 3ebee21

Please sign in to comment.