File tree Expand file tree Collapse file tree 2 files changed +10
-7
lines changed
Expand file tree Collapse file tree 2 files changed +10
-7
lines changed Original file line number Diff line number Diff line change @@ -215,6 +215,8 @@ export function useSharedGridLogic() {
215215 high
216216 ) ;
217217 store . updateHistogram ( histogram ) ;
218+ } else {
219+ store . updateHistogram ( undefined ) ;
218220 }
219221 }
220222
Original file line number Diff line number Diff line change @@ -65,19 +65,20 @@ function filterInvalidData(
6565 missingValue ?: number ,
6666 fillValue ?: number
6767) {
68- const rawData = data as ArrayLike < number > ;
69- const validData = Array . from ( rawData ) . filter ( ( value ) => {
68+ const validData : number [ ] = [ ] ;
69+ for ( let i = 0 ; i < data . length ; i ++ ) {
70+ const value = data [ i ] ;
7071 if ( ! isFinite ( value ) ) {
71- return false ;
72+ continue ;
7273 }
7374 if ( missingValue !== undefined && value === missingValue ) {
74- return false ;
75+ continue ;
7576 }
7677 if ( fillValue !== undefined && value === fillValue ) {
77- return false ;
78+ continue ;
7879 }
79- return true ;
80- } ) ;
80+ validData . push ( value ) ;
81+ }
8182 return validData ;
8283}
8384
You can’t perform that action at this time.
0 commit comments