@@ -208,7 +208,8 @@ const TSDataContainerHistoric = (props: TSDataContainerProps) => {
208208 vv . push ( found ) ;
209209 } else {
210210 vv . push ( {
211- value : null ,
211+ value :
212+ k . indexOf ( 'decade' ) >= 0 ? vv [ vv . length - 1 ] ?. value : null ,
212213 datetime : y . toString ( ) ,
213214 } ) ;
214215 }
@@ -253,40 +254,17 @@ const TSDataContainerHistoric = (props: TSDataContainerProps) => {
253254 const [ processingMethod , setProcessingMethod ] = useState < string > (
254255 'moving_average_11_years' ,
255256 ) ;
256- const [ baseClimatologicalModel , setBaseClimatologicalModel ] =
257- useState < string > ( 'model_ensemble' ) ;
258- const [ comparisonClimatologicalModel , setComparisonClimatologicalModel ] =
259- useState < string > ( currentMap . climatological_model ) ;
260- const [ sensorProcessingMehtod , setSensorProcessingMethod ] =
261- useState < string > ( 'no_processing' ) ;
257+
262258 const [ uncert , setUncert ] = useState < boolean > ( true ) ;
263259
264260 const [ pseriesObj , setPseriesObj ] = useState < any > ( [ ] ) ;
265261
266262 useEffect ( ( ) => {
267- setFilters (
268- baseClimatologicalModel ,
269- comparisonClimatologicalModel ,
270- processingMethod ,
271- sensorProcessingMehtod ,
272- uncert ,
273- ) ;
274- } , [
275- baseClimatologicalModel ,
276- comparisonClimatologicalModel ,
277- processingMethod ,
278- sensorProcessingMehtod ,
279- uncert ,
280- ] ) ;
263+ setFilters ( processingMethod , uncert ) ;
264+ } , [ processingMethod , uncert ] ) ;
281265
282266 useEffect ( ( ) => {
283- setFilters (
284- baseClimatologicalModel ,
285- comparisonClimatologicalModel ,
286- processingMethod ,
287- sensorProcessingMehtod ,
288- uncert ,
289- ) ;
267+ setFilters ( processingMethod , uncert ) ;
290268
291269 setTimeRange ( {
292270 ...{
@@ -431,12 +409,7 @@ const TSDataContainerHistoric = (props: TSDataContainerProps) => {
431409 let pseriesObj = [ ...timeseries ] ;
432410 setPseriesObj ( pseriesObj ) ;
433411 }
434- } , [
435- timeseries ,
436- processingMethod ,
437- comparisonClimatologicalModel ,
438- sensorProcessingMehtod ,
439- ] ) ;
412+ } , [ timeseries , processingMethod ] ) ;
440413
441414 let seriesFilter = pseriesObj . reduce ( ( prev , item ) => {
442415 const onV = getName ( item ) ;
@@ -630,13 +603,7 @@ const TSDataContainerHistoric = (props: TSDataContainerProps) => {
630603 let uv = ! uncert ;
631604 setUncert ( uv ) ;
632605
633- setFilters (
634- baseClimatologicalModel ,
635- comparisonClimatologicalModel ,
636- processingMethod ,
637- sensorProcessingMehtod ,
638- uv ,
639- ) ;
606+ setFilters ( processingMethod , uv ) ;
640607 } ,
641608 ontouchstart : ( ) => {
642609 console . log ( 'touch start' ) ;
0 commit comments