File tree Expand file tree Collapse file tree 1 file changed +2
-3
lines changed Expand file tree Collapse file tree 1 file changed +2
-3
lines changed Original file line number Diff line number Diff line change @@ -42,13 +42,12 @@ module.exports = function calc(gd, trace) {
42
42
43
43
// sample standard deviation
44
44
var ssd = Lib . stdev ( vals , len - 1 , cdi . mean ) ;
45
- var bandwidthDflt = ruleOfThumbBandwidth ( vals , ssd , cdi . q3 - cdi . q1 ) ;
46
- var bandwidth = cdi . bandwidth = trace . bandwidth || bandwidthDflt ;
45
+ var bandwidth = cdi . bandwidth = trace . bandwidth || ruleOfThumbBandwidth ( vals , ssd , cdi . q3 - cdi . q1 ) ;
47
46
var span = cdi . span = calcSpan ( trace , cdi , valAxis , bandwidth ) ;
48
47
49
48
// step that well covers the bandwidth and is multiple of span distance
50
49
var dist = span [ 1 ] - span [ 0 ] ;
51
- var n = Math . ceil ( dist / ( Math . min ( bandwidthDflt , bandwidth ) / 3 ) ) ;
50
+ var n = Math . ceil ( dist / ( bandwidth / 3 ) ) ;
52
51
var step = dist / n ;
53
52
54
53
if ( ! isFinite ( step ) || ! isFinite ( n ) ) {
You can’t perform that action at this time.
0 commit comments