Skip to content

Commit

Permalink
address off-by-one in zero-filling fixed series data
Browse files Browse the repository at this point in the history
  • Loading branch information
dchester committed Aug 9, 2013
1 parent 1225579 commit a7f7acb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/js/Rickshaw.Series.FixedDuration.js
Expand Up @@ -40,7 +40,7 @@ Rickshaw.Series.FixedDuration = Rickshaw.Class.create(Rickshaw.Series, {

// zero-fill up to maxDataPoints size if we don't have that much data yet
if ((typeof(this.maxDataPoints) !== 'undefined') && (this.currentSize < this.maxDataPoints)) {
for (var i = this.maxDataPoints - this.currentSize - 1; i > 0; i--) {
for (var i = this.maxDataPoints - this.currentSize - 1; i > 1; i--) {
this.currentSize += 1;
this.currentIndex += 1;
this.forEach( function (item) {
Expand Down

0 comments on commit a7f7acb

Please sign in to comment.