Skip to content

Commit

Permalink
default to a sensible time interval in Rickshaw.Series
Browse files Browse the repository at this point in the history
  • Loading branch information
dchester committed Jul 4, 2012
1 parent f526279 commit 3ff3888
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/js/Rickshaw.Series.js
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -12,6 +12,12 @@ Rickshaw.Series = Rickshaw.Class.create( Array, {
Math.floor(new Date().getTime() / 1000) : Math.floor(new Date().getTime() / 1000) :
options.timeBase; options.timeBase;


var timeInterval = typeof(options.timeInterval) == 'undefined' ?
1000 :
options.timeInterval;

this.setTimeInterval(timeInterval);

if (data && (typeof(data) == "object") && (data instanceof Array)) { if (data && (typeof(data) == "object") && (data instanceof Array)) {
data.forEach( function(item) { this.addItem(item) }, this ); data.forEach( function(item) { this.addItem(item) }, this );
} }
Expand Down

0 comments on commit 3ff3888

Please sign in to comment.