Permalink
Browse files

Allow a second options argument to d3_tsline

Allow a second options argument to d3_tsline, for now this is used to
override the width and height values.
  • Loading branch information...
1 parent 50e1e07 commit da1cc5749754897b6fd3187d9fb73ba751d31c84 @smoothdeveloper committed May 23, 2012
Showing with 6 additions and 2 deletions.
  1. +6 −2 js/d3.tsline.js
View
@@ -13,8 +13,12 @@ function d3_tsline(id) {
data: { x: [0,0], y: [0,0] }
};
- self.width = 1000;
- self.height = 400;
+ var options = { };
+ if(arguments.length >= 2){
+ options = arguments[1];
+ }
+ self.width = options.width || 1000;
+ self.height = options.height || 400;
self.summary_height = 50;
self.handle_height = 14;
self.summary_margin = 15;

0 comments on commit da1cc57

Please sign in to comment.