Browse files

default to a sensible time interval in Rickshaw.Series

  • Loading branch information...
1 parent f526279 commit 3ff388821bcc1cf6832a484cb6af4dfa12ed7494 @dchester dchester committed Jul 4, 2012
Showing with 6 additions and 0 deletions.
  1. +6 −0 src/js/Rickshaw.Series.js
View
6 src/js/Rickshaw.Series.js
@@ -12,6 +12,12 @@ Rickshaw.Series = Rickshaw.Class.create( Array, {
Math.floor(new Date().getTime() / 1000) :
options.timeBase;
+ var timeInterval = typeof(options.timeInterval) == 'undefined' ?
+ 1000 :
+ options.timeInterval;
+
+ this.setTimeInterval(timeInterval);
+
if (data && (typeof(data) == "object") && (data instanceof Array)) {
data.forEach( function(item) { this.addItem(item) }, this );
}

0 comments on commit 3ff3888

Please sign in to comment.