(lo, hi)
| 42 | } |
| 43 | |
| 44 | function fixExtremes(lo, hi) { |
| 45 | if(isNaN(lo) || !isFinite(lo)) { |
| 46 | lo = 0; |
| 47 | } |
| 48 | |
| 49 | if(isNaN(hi) || !isFinite(hi)) { |
| 50 | hi = 0; |
| 51 | } |
| 52 | |
| 53 | // avoid a degenerate (zero-width) domain |
| 54 | if(lo === hi) { |
| 55 | if(lo === 0) { |
| 56 | // no use to multiplying zero, so add/subtract in this case |
| 57 | lo -= 1; |
| 58 | hi += 1; |
| 59 | } else { |
| 60 | // this keeps the range in the order of magnitude of the data |
| 61 | lo *= 0.9; |
| 62 | hi *= 1.1; |
| 63 | } |
| 64 | } |
| 65 | |
| 66 | return [lo, hi]; |
| 67 | } |
| 68 | |
| 69 | function toText(formatter, texts) { |
| 70 | if(texts) { |
no outgoing calls
no test coverage detected
searching dependent graphs…