File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
packages/vdataset/src/transform Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -247,8 +247,8 @@ export const bin: Transform = (data: Array<object>, options?: IBinOptions) => {
247247 for ( let i = 0 ; i <= bins ; i ++ ) {
248248 thresholds [ i ] = start + stepSizeInt * i ;
249249 if ( thresholds [ i ] > max ) {
250- bins = i + 1 ;
251- thresholds . length = bins ;
250+ bins = i ;
251+ thresholds . length = bins + 1 ;
252252 break ;
253253 }
254254 }
@@ -258,8 +258,8 @@ export const bin: Transform = (data: Array<object>, options?: IBinOptions) => {
258258 for ( let i = 0 ; i <= bins ; i ++ ) {
259259 thresholds [ i ] = min + stepSize * i ;
260260 if ( thresholds [ i ] > max ) {
261- bins = i + 1 ;
262- thresholds . length = bins ;
261+ bins = i ;
262+ thresholds . length = bins + 1 ;
263263 break ;
264264 }
265265 }
You can’t perform that action at this time.
0 commit comments