~bac/juju-gui/trunkcopy

« back to all changes in this revision

Viewing changes to lib/d3/src/scale/scale.js

  • Committer: kapil.foss at gmail
  • Date: 2012-07-13 18:45:59 UTC
  • Revision ID: kapil.foss@gmail.com-20120713184559-2xl7be17egsrz0c9
reshape

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
d3.scale = {};
2
 
 
3
 
function d3_scaleExtent(domain) {
4
 
  var start = domain[0], stop = domain[domain.length - 1];
5
 
  return start < stop ? [start, stop] : [stop, start];
6
 
}
7
 
 
8
 
function d3_scaleRange(scale) {
9
 
  return scale.rangeExtent ? scale.rangeExtent() : d3_scaleExtent(scale.range());
10
 
}