File tree 1 file changed +5
-3
lines changed
1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -172,9 +172,7 @@ function maybeBin(options) {
172
172
}
173
173
174
174
function maybeThresholds ( thresholds ) {
175
- if ( thresholds === undefined ) {
176
- return ( ...args ) => Math . min ( 200 , thresholdScott ( ...args ) ) ;
177
- }
175
+ if ( thresholds === undefined ) return thresholdDefault ;
178
176
if ( typeof thresholds === "string" ) {
179
177
switch ( thresholds . toLowerCase ( ) ) {
180
178
case "freedman-diaconis" : return thresholdFreedmanDiaconis ;
@@ -186,6 +184,10 @@ function maybeThresholds(thresholds) {
186
184
return thresholds ; // pass array, count, or function to bin.thresholds
187
185
}
188
186
187
+ function thresholdDefault ( values , min , max ) {
188
+ return Math . min ( 200 , thresholdScott ( values , min , max ) ) ;
189
+ }
190
+
189
191
function isTimeInterval ( t ) {
190
192
return t ? typeof t . range === "function" : false ;
191
193
}
You can’t perform that action at this time.
0 commit comments