Skip to content
Browse files

add support for manually set ranges

  • Loading branch information...
1 parent dcc6bd8 commit c842fcad9d89ce775f5ca5c30d05689dd35e9a32 @al2o3cr committed May 5, 2012
Showing with 4 additions and 4 deletions.
  1. +4 −4 g.line.js
View
8 g.line.js
@@ -99,11 +99,11 @@
var allx = Array.prototype.concat.apply([], valuesx),
ally = Array.prototype.concat.apply([], valuesy),
xdim = chartinst.snapEnds(Math.min.apply(Math, allx), Math.max.apply(Math, allx), valuesx[0].length - 1),
- minx = xdim.from,
- maxx = xdim.to,
+ minx = opts.xmin || xdim.from,
+ maxx = opts.xmax || xdim.to,
ydim = chartinst.snapEnds(Math.min.apply(Math, ally), Math.max.apply(Math, ally), valuesy[0].length - 1),
- miny = ydim.from,
- maxy = ydim.to,
+ miny = opts.ymin || ydim.from,
+ maxy = opts.ymax || ydim.to,
kx = (width - gutter * 2) / ((maxx - minx) || 1),
ky = (height - gutter * 2) / ((maxy - miny) || 1);

0 comments on commit c842fca

Please sign in to comment.
Something went wrong with that request. Please try again.