Skip to content

Commit ab084f4

Browse files
WV-3689 Charting Request Stacking (#6113)
* Stacking progress * Variable point sizing * Added max days, removed console logs * Endpoint change * Error days handling * More point sizes and error_days fix * Fixed minimum point count sizing * Undo merge * Undo jest url change * Squashed commit of the following: commit 0126f07 Author: Patrick Moulden <4834892+PatchesMaps@users.noreply.github.com> Date: Wed Oct 8 11:03:03 2025 -0400 Revert "WV-3452 build time 2 (#6189)" (#6190) This reverts commit 44165fe. commit 44165fe Author: Patrick Moulden <4834892+PatchesMaps@users.noreply.github.com> Date: Wed Oct 8 10:35:31 2025 -0400 WV-3452 build time 2 (#6189) * Verbose mode * Comprehensive performance enhancements * Improve error handling and logging in layer metadata fetching commit 02cb997 Author: Patrick Moulden <4834892+PatchesMaps@users.noreply.github.com> Date: Tue Oct 7 17:02:34 2025 -0400 Revert "WV-3452 build time 1 (#6187)" (#6188) This reverts commit 78782e6. commit 78782e6 Author: Patrick Moulden <4834892+PatchesMaps@users.noreply.github.com> Date: Tue Oct 7 16:25:16 2025 -0400 WV-3452 build time 1 (#6187) * Verbose mode * Comprehensive performance enhancements commit 9d71e97 Merge: 8bce092 62578e1 Author: christof-wittreich <christof.wittreich@nasa.gov> Date: Tue Sep 30 18:57:31 2025 -0400 Merge pull request #6170 from nasa-gibs/main Main to Develop v4.78.0 commit 62578e1 Merge: 482289e 34ac27d Author: christof-wittreich <christof.wittreich@nasa.gov> Date: Tue Sep 30 18:17:46 2025 -0400 Merge pull request #6169 from nasa-gibs/release Release to Main v4.78.0 commit 34ac27d Merge: a8c0624 980bb89 Author: christof-wittreich <christof.wittreich@nasa.gov> Date: Tue Sep 30 17:10:32 2025 -0400 Merge pull request #6168 from nasa-gibs/UAT-v4.78.0 UAT-v4.78.0 to Release commit 980bb89 Author: christof-wittreich <christof.wittreich@nasa.gov> Date: Tue Sep 30 16:26:02 2025 -0400 v4.78.0 commit 8bce092 Author: minniewong <min.m.wong@nasa.gov> Date: Tue Sep 30 15:27:13 2025 -0400 Add Sentinel-1C orbit tracks (#6167) * Add Sentinel-1C orbit tracks * add preview images * add wrap commit d54fd94 Author: Patrick Moulden <4834892+PatchesMaps@users.noreply.github.com> Date: Tue Sep 30 14:07:16 2025 -0400 dependency updates (#6163) commit c0b71cc Merge: 4bb9f60 482289e Author: christof-wittreich <christof.wittreich@nasa.gov> Date: Tue Sep 30 12:27:56 2025 -0400 Merge pull request #6166 from nasa-gibs/main Main to Develop v4.77.0 commit 482289e Merge: 3d3ed4e a8c0624 Author: christof-wittreich <christof.wittreich@nasa.gov> Date: Tue Sep 30 10:46:32 2025 -0400 Merge pull request #6165 from nasa-gibs/release Release to Main v4.77.0 commit a8c0624 Merge: 4485aea e1d7b5f Author: christof-wittreich <christof.wittreich@nasa.gov> Date: Tue Sep 30 09:06:46 2025 -0400 Merge pull request #6164 from nasa-gibs/UAT-v4.77.0 UAT-v4.77.0 to Release commit e1d7b5f Author: christof-wittreich <christof.wittreich@nasa.gov> Date: Tue Sep 30 08:17:23 2025 -0400 v4.77.0 commit 4bb9f60 Author: minniewong <min.m.wong@nasa.gov> Date: Mon Sep 29 16:53:16 2025 -0400 WV-3759: Add OPERA RTC Layer (#6162) * Add OPERA RTC layer * Add measurement * Update measurement name and preview image * fix typo * Update OPERA_L2_Radiometric_Terrain_Corrected_SAR_Sentinel-1.json commit 6e8c9ff Author: minniewong <min.m.wong@nasa.gov> Date: Mon Sep 29 14:44:51 2025 -0400 WV-3741: Add NOAA-20/VIIRS EVI and NDVI layers (#6153) * Add NOAA-20 EVI and NDVI layers * Add preview images * fix extra spacing commit 9b261b6 Author: minniewong <min.m.wong@nasa.gov> Date: Mon Sep 29 12:12:59 2025 -0400 Change rollingWindow to 90; change layergroup (#6154) commit 106cb58 Author: minniewong <min.m.wong@nasa.gov> Date: Mon Sep 29 12:11:56 2025 -0400 Update HLS_MSAVI_Sentinel.json (#6152) commit c783d1c Author: minniewong <min.m.wong@nasa.gov> Date: Thu Sep 25 17:04:24 2025 -0400 WV-3745 & WV-3746: Add PACE HARP2 and SPEXone Corrected Reflectance (#6147) * Add SPEXone and HARP2 CR layers * Add preview images * Update layer-picker-test.spec.js * Update layer descriptions * Remove wrap and update preview image commit e4fab6f Author: christof-wittreich <christof.wittreich@nasa.gov> Date: Fri Sep 19 13:06:18 2025 -0400 Dependency Updates 09-19-25 (#6151) commit cf6a904 Author: minniewong <min.m.wong@nasa.gov> Date: Thu Sep 18 12:45:20 2025 -0400 WV-3747: HLS indices fix; WV-3749: Ship tracks fix (#6146) * Update band combos, layergroups, descriptions, preview images * Update PACE-PAX_RV-Shearwater_Ship_Track.json commit f24c91a Merge: 81a4a09 3d3ed4e Author: christof-wittreich <christof.wittreich@nasa.gov> Date: Tue Sep 16 10:20:34 2025 -0400 Merge pull request #6145 from nasa-gibs/main Main to Develop v4.76.0 commit 3d3ed4e Merge: d4b8a49 4485aea Author: christof-wittreich <christof.wittreich@nasa.gov> Date: Tue Sep 16 09:33:00 2025 -0400 Merge pull request #6144 from nasa-gibs/release Release to Main v4.76.0 commit 4485aea Merge: 30126c5 92cfceb Author: christof-wittreich <christof.wittreich@nasa.gov> Date: Mon Sep 15 14:59:39 2025 -0400 Merge pull request #6142 from nasa-gibs/UAT-v4.76.0 UAT-v4.76.0 to Release commit 92cfceb Merge: e733d49 81a4a09 Author: christof-wittreich <christof.wittreich@nasa.gov> Date: Mon Sep 15 14:12:04 2025 -0400 Merge branch 'develop' into UAT-v4.76.0 commit 81a4a09 Author: christof-wittreich <christof.wittreich@nasa.gov> Date: Mon Sep 15 13:30:19 2025 -0400 Fixed styling (#6143) commit e733d49 Author: christof-wittreich <christof.wittreich@nasa.gov> Date: Mon Sep 15 11:05:18 2025 -0400 v4.76.0 commit e811a9c Author: christof-wittreich <christof.wittreich@nasa.gov> Date: Mon Sep 15 09:43:08 2025 -0400 WV-3590 - Chart Window Additions (#6054) * Added chart window changes * Added leading 0 in dates * UI tweaks * Adjusted UI for requested changes * Merge branch 'develop' into wv-3590-charting-minimap * Alignment fixes * Expand/collapse ui changes * Feedback changes * Remove mock data commit c00db9d Author: minniewong <min.m.wong@nasa.gov> Date: Mon Sep 15 09:36:04 2025 -0400 WV-2454: Add 6 AMSR-UE Ocean layers (#6140) * Add AMSR-UE Ocean L2 layers * Update AMSRUE_Cloud_Liquid_Water_Day.md * Add preview images * Update Precipitation Rate.json commit 54c5f5e Author: minniewong <min.m.wong@nasa.gov> Date: Fri Sep 12 16:21:36 2025 -0400 Add 3 PACE-PAX flight and ship tracks (#6139) commit 368c3f8 Author: minniewong <min.m.wong@nasa.gov> Date: Fri Sep 12 14:46:26 2025 -0400 WV-2384: Add 4 AMSR-UE Rain layers (#6127) * Add AMSR-UE rain layers * Update naming of surface precip layers * Add preview images commit ca16332 Author: minniewong <min.m.wong@nasa.gov> Date: Fri Sep 12 14:14:59 2025 -0400 WV-3505: Add 4 AMSR-UE Soil moisture layers (#6126) * Add AMSR-UE Soil moisture layers * Preview images commit 78c7944 Author: christof-wittreich <christof.wittreich@nasa.gov> Date: Fri Sep 12 13:19:07 2025 -0400 Dependency Updates 09-12-25 (#6138) commit a74ea14 Author: christof-wittreich <christof.wittreich@nasa.gov> Date: Tue Sep 9 15:39:35 2025 -0400 Disabled charting on specific layers (#6125) commit f4bab50 Author: minniewong <min.m.wong@nasa.gov> Date: Tue Sep 9 11:53:48 2025 -0400 Update PM 2.5 layer descriptions (#6112) commit 4845495 Author: christof-wittreich <christof.wittreich@nasa.gov> Date: Tue Sep 9 11:51:50 2025 -0400 Added script (#6124) commit dcb3587 Author: minniewong <min.m.wong@nasa.gov> Date: Mon Sep 8 14:43:12 2025 -0400 WV-3576: add PACE Corrected Reflectance as default; WV-3735: Update Landsat 9 launch date (#6111) * Update defaults.json * Update Landsat 9 launch date * Update E2E test * Update layer-picker-mobile-test.spec.js * Update wvHooks.js * Updated test * Revert "Updated test" This reverts commit 9ff1d9b. * Updated correct test --------- Co-authored-by: christof-wittreich <christof.wittreich@nasa.gov> commit 6d13b4a Author: minniewong <min.m.wong@nasa.gov> Date: Fri Sep 5 16:34:33 2025 -0400 Remove duplicate text (#6123) commit d5c8309 Author: christof-wittreich <christof.wittreich@nasa.gov> Date: Fri Sep 5 10:32:58 2025 -0400 Dependency Updates 09-05-25 (#6122) commit 169048d Author: christof-wittreich <christof.wittreich@nasa.gov> Date: Tue Sep 2 10:06:34 2025 -0400 Merge pull request #6109 from nasa-gibs/dependency-updates-08-29-2025 Dependency Updates 08-29-25 commit 2415913 Merge: 21c0f49 d4b8a49 Author: christof-wittreich <christof.wittreich@nasa.gov> Date: Thu Aug 28 10:31:23 2025 -0400 Merge pull request #6100 from nasa-gibs/main Main to Develop v4.75.0 commit d4b8a49 Merge: 9c06adc 30126c5 Author: christof-wittreich <christof.wittreich@nasa.gov> Date: Thu Aug 28 09:33:54 2025 -0400 Merge pull request #6099 from nasa-gibs/release Release to Main v4.75.0 commit 30126c5 Merge: 2831c9d a564872 Author: christof-wittreich <christof.wittreich@nasa.gov> Date: Wed Aug 27 16:24:57 2025 -0400 Merge pull request #6098 from nasa-gibs/UAT-v4.75.0-1 UAT-v4.75.0-1 to Release commit a564872 Author: christof-wittreich <christof.wittreich@nasa.gov> Date: Wed Aug 27 15:39:28 2025 -0400 v4.75.0-1 commit 21c0f49 Author: christof-wittreich <christof.wittreich@nasa.gov> Date: Wed Aug 27 14:38:45 2025 -0400 WV-3729 - Land Surface Disturbance Tour Story Fixes (#6097) * Update land_disturbance.json * Escaped quotation marks * Check active comparison side * Update surface_water_extent.json --------- Co-authored-by: mwong4 <min.m.wong@nasa.gov> commit 26bb986 Author: christof-wittreich <christof.wittreich@nasa.gov> Date: Wed Aug 27 09:46:45 2025 -0400 WV-3728 - Comparison Mode Place Labels Fix (#6096) * Removed declutter * Added unique declutter labels for each side commit a790544 Author: Patrick Moulden <4834892+PatchesMaps@users.noreply.github.com> Date: Tue Aug 26 16:29:26 2025 -0400 GITC-7930-ndvi (#6095) * VIIRS_SNPP_NDVI_8Day * Restore sea ice scenarios * comma * threshold commit 2831c9d Merge: a4cb7c1 cd4a3a0 Author: christof-wittreich <christof.wittreich@nasa.gov> Date: Mon Aug 25 17:03:43 2025 -0400 Merge pull request #6093 from nasa-gibs/UAT-v4.75.0 UAT-v4.75.0 to Release commit cd4a3a0 Author: christof-wittreich <christof.wittreich@nasa.gov> Date: Mon Aug 25 16:17:39 2025 -0400 v4.75.0 commit ecdf864 Author: christof-wittreich <christof.wittreich@nasa.gov> Date: Mon Aug 25 13:13:22 2025 -0400 WV-3066 - Openlayers v10 Support (#6031) * Openlayers v10 upgrade * Add waiting for all data to preload * Updated documentation * Squashed commit of the following: commit 0a854ff Author: christof-wittreich <christof.wittreich@nasa.gov> Date: Mon Aug 25 10:27:22 2025 -0400 Dependency Updates 08-22-25 (#6092) commit 910590d Merge: 9d59f14 9c06adc Author: christof-wittreich <christof.wittreich@nasa.gov> Date: Wed Aug 20 16:37:27 2025 -0400 Merge pull request #6088 from nasa-gibs/main Main to Develop v4.74.0 commit 9c06adc Merge: 5e85011 a4cb7c1 Author: christof-wittreich <christof.wittreich@nasa.gov> Date: Wed Aug 20 15:45:37 2025 -0400 Merge pull request #6087 from nasa-gibs/release Release to Main v4.74.0 commit a4cb7c1 Author: christof-wittreich <christof.wittreich@nasa.gov> Date: Wed Aug 20 14:06:44 2025 -0400 UAT-v4.74.0 to Release (#6086) * Node v22.18.0 (#6055) * Dependency Updates 08-08-25 (#6065) * Update doi to new version (#6066) * Add three NIghttime lights (DNB) layers (#6067) * Dependency Updates 08-15-25 (#6078) * WV-3720: Add updated HLS VI descriptions (#6079) * Update NDVI, NDMI, NBR and NBR2 VI HLS descriptions * update descriptions * WV-3581 - Improved Charting Error Messages (#6081) * Removed 'days' and accounted for error_days * Removed 'try again' text * Text correction * WV-3579 - Prevent pan/zoom when in Charting Mode (#6070) * Charting mode lock-down * Projection button conditional disabling * WV-3639: Add OPERA Vegetation Disturbance Annual layer (#6082) * Add OPERA DIST-ANN layer * Update OPERA_L3_DIST-ANN-HLS_Color_Index.json * Add TROPOMI SO2 (#6080) * Update to point to v8 doi dataset landing pages (#6068) * npm scans (#6083) * WV-3645: Add 3 AMSRUE snow water equivalent layers (#6084) * Add 2 AMSRUE SWE layers * Add preview images * Update Sulfur Dioxide.json (#6085) * v4.74.0 --------- Co-authored-by: minniewong <min.m.wong@nasa.gov> commit 9d59f14 Author: minniewong <min.m.wong@nasa.gov> Date: Wed Aug 20 12:08:49 2025 -0400 Update Sulfur Dioxide.json (#6085) commit c2f4350 Author: minniewong <min.m.wong@nasa.gov> Date: Wed Aug 20 12:00:45 2025 -0400 WV-3645: Add 3 AMSRUE snow water equivalent layers (#6084) * Add 2 AMSRUE SWE layers * Add preview images commit 120ade1 Author: christof-wittreich <christof.wittreich@nasa.gov> Date: Wed Aug 20 11:15:22 2025 -0400 npm scans (#6083) commit 0806f2d Author: minniewong <min.m.wong@nasa.gov> Date: Wed Aug 20 09:17:48 2025 -0400 Update to point to v8 doi dataset landing pages (#6068) commit 2ed821d Author: minniewong <min.m.wong@nasa.gov> Date: Wed Aug 20 09:17:28 2025 -0400 Add TROPOMI SO2 (#6080) commit 3346694 Author: minniewong <min.m.wong@nasa.gov> Date: Wed Aug 20 09:17:10 2025 -0400 WV-3639: Add OPERA Vegetation Disturbance Annual layer (#6082) * Add OPERA DIST-ANN layer * Update OPERA_L3_DIST-ANN-HLS_Color_Index.json commit 98c5f29 Author: christof-wittreich <christof.wittreich@nasa.gov> Date: Wed Aug 20 09:12:54 2025 -0400 WV-3579 - Prevent pan/zoom when in Charting Mode (#6070) * Charting mode lock-down * Projection button conditional disabling commit 63b09ec Author: christof-wittreich <christof.wittreich@nasa.gov> Date: Wed Aug 20 08:41:08 2025 -0400 WV-3581 - Improved Charting Error Messages (#6081) * Removed 'days' and accounted for error_days * Removed 'try again' text * Text correction commit 0605e51 Author: minniewong <min.m.wong@nasa.gov> Date: Tue Aug 19 15:51:23 2025 -0400 WV-3720: Add updated HLS VI descriptions (#6079) * Update NDVI, NDMI, NBR and NBR2 VI HLS descriptions * update descriptions commit 6c5cf95 Author: christof-wittreich <christof.wittreich@nasa.gov> Date: Mon Aug 18 13:18:44 2025 -0400 Dependency Updates 08-15-25 (#6078) commit e2509a7 Author: minniewong <min.m.wong@nasa.gov> Date: Wed Aug 13 13:19:03 2025 -0400 Add three NIghttime lights (DNB) layers (#6067) commit 2e1d6b6 Author: minniewong <min.m.wong@nasa.gov> Date: Tue Aug 12 12:51:10 2025 -0400 Update doi to new version (#6066) commit 49645e4 Author: christof-wittreich <christof.wittreich@nasa.gov> Date: Mon Aug 11 13:20:27 2025 -0400 Dependency Updates 08-08-25 (#6065) commit 3d9afe4 Author: christof-wittreich <christof.wittreich@nasa.gov> Date: Thu Aug 7 15:27:47 2025 -0400 Node v22.18.0 (#6055) commit 92535bf Merge: 74890c7 5e85011 Author: christof-wittreich <christof.wittreich@nasa.gov> Date: Wed Aug 6 12:44:50 2025 -0400 Merge pull request #6053 from nasa-gibs/main Main to Develop v4.73.0 commit 5e85011 Merge: 73a034f 1f3d7e8 Author: christof-wittreich <christof.wittreich@nasa.gov> Date: Wed Aug 6 12:07:17 2025 -0400 Merge pull request #6052 from nasa-gibs/release Release to Main v4.73.0 commit 1f3d7e8 Merge: 3be7707 b964447 Author: christof-wittreich <christof.wittreich@nasa.gov> Date: Wed Aug 6 10:19:29 2025 -0400 Merge pull request #6051 from nasa-gibs/UAT-v4.73.0 UAT-v4.73.0 to Release commit b964447 Author: christof-wittreich <christof.wittreich@nasa.gov> Date: Wed Aug 6 09:03:13 2025 -0400 v4.73.0 commit 74890c7 Author: christof-wittreich <christof.wittreich@nasa.gov> Date: Tue Aug 5 16:42:34 2025 -0400 WV-3077: Add 2 PREFIRE Layers (#6050) * Add PREFIRE/TIRS Sat 1 and Sat 2 layers * Added preview images * Fixed typos --------- Co-authored-by: mwong4 <min.m.wong@nasa.gov> commit 19cfa6b Author: christof-wittreich <christof.wittreich@nasa.gov> Date: Fri Aug 1 10:47:37 2025 -0400 Dependency Updates 08-01-25 (#6048) commit 0a854ff Author: christof-wittreich <christof.wittreich@nasa.gov> Date: Mon Aug 25 10:27:22 2025 -0400 Dependency Updates 08-22-25 (#6092) * Merge branch wv-3731-charting-graph-points * Handle error days points * Update charting-mode-options.js --------- Co-authored-by: mwong4 <min.m.wong@nasa.gov>
1 parent d5e2111 commit ab084f4

File tree

4 files changed

+97
-13
lines changed

4 files changed

+97
-13
lines changed

config/default/common/config/metadata/layers/reference/orbits/OrbitTracks_Sentinel-1C_Ascending.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
The Sentinel-1C Orbital Track & Overpass Time (Ascending/Night) layer is the path of the Sentinel-1C satellite on its ascending/night-time orbit. Overpass times are shown in Coordinated Universal Time (UTC).
1+
The Sentinel-1A Orbital Track & Overpass Time (Ascending/Night) layer is the path of the Sentinel-1C satellite on its ascending/night-time orbit. Overpass times are shown in Coordinated Universal Time (UTC).
22

33
The Sentinel-1 mission is a constellation of two polar-orbiting satellites, Sentinel-1A and Sentinel-1C, which share the same orbital plane. They operate day and night performing C-band synthetic aperture radar imaging enabling them to acquire regardless of weather. The C-band synthetic aperture radar instrument has a right-looking active phased array antenna which operates in four acquisition modes: Strip Map, Interferometric Wide Swath, Extra-Wide Swath, and Wave Mode. This means that these orbit tracks reflect the path of the satellite and not the location of the data swaths; the data swaths are collected off nadir, to the right of the satellite. [Learn more about the Sentinel-1 instrument payload and acquisition modes](https://sentinel.esa.int/web/sentinel/missions/sentinel-1/instrument-payload).
44

config/default/common/config/metadata/layers/reference/orbits/OrbitTracks_Sentinel-1C_Descending.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
The Sentinel-1C Orbital Track & Overpass Time (Ascending/Night) layer is the path of the Sentinel-1C satellite on its ascending/night-time orbit. Overpass times are shown in Coordinated Universal Time (UTC).
1+
The Sentinel-1A Orbital Track & Overpass Time (Ascending/Night) layer is the path of the Sentinel-1C satellite on its ascending/night-time orbit. Overpass times are shown in Coordinated Universal Time (UTC).
22

33
The Sentinel-1 mission is a constellation of two polar-orbiting satellites, Sentinel-1A and Sentinel-1C, which share the same orbital plane. They operate day and night performing C-band synthetic aperture radar imaging enabling them to acquire regardless of weather. The C-band synthetic aperture radar instrument has a right-looking active phased array antenna which operates in four acquisition modes: Strip Map, Interferometric Wide Swath, Extra-Wide Swath, and Wave Mode. This means that these orbit tracks reflect the path of the satellite and not the location of the data swaths; the data swaths are collected off nadir, to the right of the satellite. [Learn more about the Sentinel-1 instrument payload and acquisition modes](https://sentinel.esa.int/web/sentinel/missions/sentinel-1/instrument-payload).
44

web/js/components/charting/chart-component.js

Lines changed: 28 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,11 +46,12 @@ function ChartComponent (props) {
4646
errors,
4747
} = liveData;
4848

49-
const errorDaysArr = errors?.error_days?.replaceAll(/('|\[|\])/gi, '').split(', ') || [];
49+
const errorDaysArr = errors?.error_days || [];
5050
const format = util.getCoordinateFormat();
5151

5252
// Arbitrary array of colors to use
5353
const lineColors = ['#A3905D', '#82CA9D', 'orange', 'pink', 'green', 'red', 'yellow', 'aqua', 'maroon'];
54+
const pointSizes = [3, 2, 1.5, 1.25];
5455
const formattedUnit = unit ? ` (${unit})` : '';
5556

5657
function formatToThreeDigits(str) {
@@ -208,12 +209,38 @@ function ChartComponent (props) {
208209
function getLineChart(chartData) {
209210
const chartLineName = getLineNames(chartData);
210211

212+
function CustomizedDot(props) {
213+
const {
214+
cx,
215+
cy,
216+
fill,
217+
stroke,
218+
payload,
219+
} = props;
220+
221+
if (!payload.mean) return;
222+
223+
const radius = pointSizes[Math.max(Math.floor(chartData.length / 26), 1) - 1];
224+
225+
const transformFunc = `translate(${radius + 1} ${radius + 1})`;
226+
227+
return (
228+
<svg x={cx - radius - 1} y={cy - radius - 1}>
229+
<g transform={transformFunc}>
230+
<circle r={radius + 0.5} fill={stroke} />
231+
<circle r={radius - 0.5} fill={fill} />
232+
</g>
233+
</svg>
234+
);
235+
}
236+
211237
const chartLinesArr = chartLineName.map((id, index) => (
212238
<Line
213239
type="linear"
214240
key={id}
215241
dataKey={chartLineName[index]}
216242
stroke={lineColors[index]}
243+
dot={<CustomizedDot />}
217244
/>
218245
));
219246
return chartLinesArr;

web/js/components/sidebar/charting-mode-options.js

Lines changed: 67 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ const vectorLayers = {};
4040
const sources = {};
4141
let init = false;
4242
const STEP_NUM = 31;
43+
const MAX_DAYS = 100;
4344
const SERVER_ERROR_MESSAGE = 'An error has occurred while requesting the charting data. Please try again in a few minutes.';
4445
const NO_DATA_ERROR_MESSAGE = 'No data was found for this request. Please check the layer, date(s) & location.';
4546

@@ -253,9 +254,9 @@ function ChartingModeOptions(props) {
253254
* @param {Object} layerInfo
254255
* @param {String} timeSpanSelection | 'Date' for single date, 'Range' for date range, 'series' for time series charting
255256
*/
256-
function getImageStatRequestParameters(layerInfo, timeSpan) {
257-
const startDateForImageStat = formatDateForImageStat(initialStartDate);
258-
const endDateForImageStat = formatDateForImageStat(initialEndDate);
257+
function getImageStatRequestParameters(layerInfo, timeSpan, startDate, endDate) {
258+
const startDateForImageStat = formatDateForImageStat(startDate);
259+
const endDateForImageStat = formatDateForImageStat(endDate);
259260
const AOIForImageStat = convertOLcoordsForImageStat(aoiCoordinates);
260261
return {
261262
timestamp: startDateForImageStat, // start date
@@ -301,8 +302,7 @@ function ChartingModeOptions(props) {
301302
try {
302303
const response = await fetch(simpleStatsURI, requestOptions);
303304
const data = await response.text();
304-
// Mock data, to be removed before merging
305-
// const data = JSON.stringify({"mean": {"2025-09-10T00:00:00Z": 0.32626962336612314, "2025-09-11T00:00:00Z": 0.5039413804624584, "2025-09-12T00:00:00Z": 0.6364696921707916, "2025-09-13T00:00:00Z": 0.6708885118357888, "2025-09-14T00:00:00Z": 0.8617797424304515, "2025-09-15T00:00:00Z": 0.8216062795654208, "2025-09-16T00:00:00Z": 0.636655055327338, "2025-09-17T00:00:00Z": 0.5692548394958568, "2025-09-18T00:00:00Z": 0.6042759015815452, "2025-09-19T00:00:00Z": 0.6671228369732474, "2025-09-20T00:00:00Z": 0.6438424278008147, "2025-09-21T00:00:00Z": 0.93460329417892, "2025-09-22T00:00:00Z": 0.8468979259479646, "2025-09-23T00:00:00Z": 0.5895524603400779, "2025-09-24T00:00:00Z": 0.4824067719484085, "2025-09-25T00:00:00Z": 0.5168849128927858, "2025-09-26T00:00:00Z": 0.6026034577982918, "2025-09-27T00:00:00Z": 0.5244425180168761, "2025-09-28T00:00:00Z": 0.5866451379247902, "2025-09-30T00:00:00Z": 0.4702760520116403, "2025-10-01T00:00:00Z": 0.48182150608662827, "2025-10-02T00:00:00Z": 0.3823509882219332, "2025-10-03T00:00:00Z": 0.7139505056593664, "2025-10-04T00:00:00Z": 0.9638534612792451, "2025-10-05T00:00:00Z": 0.6867387375222029, "2025-10-06T00:00:00Z": 0.6924459682425589, "2025-10-07T00:00:00Z": 0.7024427898956004, "2025-10-08T00:00:00Z": 0, "2025-10-09T00:00:00Z": 0}, "median": {"2025-09-10T00:00:00Z": "0.25", "2025-09-11T00:00:00Z": "0.4", "2025-09-12T00:00:00Z": "0.55", "2025-09-13T00:00:00Z": "0.55", "2025-09-14T00:00:00Z": "0.725", "2025-09-15T00:00:00Z": "0.775", "2025-09-16T00:00:00Z": "0.55", "2025-09-17T00:00:00Z": "0.425", "2025-09-18T00:00:00Z": "0.525", "2025-09-19T00:00:00Z": "0.525", "2025-09-20T00:00:00Z": "0.425", "2025-09-21T00:00:00Z": "0.825", "2025-09-22T00:00:00Z": "0.675", "2025-09-23T00:00:00Z": "0.525", "2025-09-24T00:00:00Z": "0.4", "2025-09-25T00:00:00Z": "0.45", "2025-09-26T00:00:00Z": "0.475", "2025-09-27T00:00:00Z": "0.425", "2025-09-28T00:00:00Z": "0.475", "2025-09-30T00:00:00Z": "0.375", "2025-10-01T00:00:00Z": "0.425", "2025-10-02T00:00:00Z": "0.3", "2025-10-03T00:00:00Z": "0.525", "2025-10-04T00:00:00Z": "0.725", "2025-10-05T00:00:00Z": "0.5", "2025-10-06T00:00:00Z": "0.625", "2025-10-07T00:00:00Z": "0.6", "2025-10-08T00:00:00Z": 0, "2025-10-09T00:00:00Z": 0}, "max": {"2025-09-10T00:00:00Z": 1.6, "2025-09-11T00:00:00Z": 2.075, "2025-09-12T00:00:00Z": 4.975, "2025-09-13T00:00:00Z": 2.775, "2025-09-14T00:00:00Z": 4.975, "2025-09-15T00:00:00Z": 3.9, "2025-09-16T00:00:00Z": 3.475, "2025-09-17T00:00:00Z": 3.45, "2025-09-18T00:00:00Z": 2.8, "2025-09-19T00:00:00Z": 2.6, "2025-09-20T00:00:00Z": 2.95, "2025-09-21T00:00:00Z": 3.025, "2025-09-22T00:00:00Z": 4.975, "2025-09-23T00:00:00Z": 2.175, "2025-09-24T00:00:00Z": 2.5, "2025-09-25T00:00:00Z": 1.975, "2025-09-26T00:00:00Z": 2.2, "2025-09-27T00:00:00Z": 2.85, "2025-09-28T00:00:00Z": 2.0, "2025-09-30T00:00:00Z": 2.4, "2025-10-01T00:00:00Z": 1.95, "2025-10-02T00:00:00Z": 2.45, "2025-10-03T00:00:00Z": 2.925, "2025-10-04T00:00:00Z": 4.4, "2025-10-05T00:00:00Z": 2.975, "2025-10-06T00:00:00Z": 2.475, "2025-10-07T00:00:00Z": 2.7, "2025-10-08T00:00:00Z": 0, "2025-10-09T00:00:00Z": 0}, "min": {"2025-09-10T00:00:00Z": 0.0, "2025-09-11T00:00:00Z": 0.0, "2025-09-12T00:00:00Z": 0.0, "2025-09-13T00:00:00Z": 0.0, "2025-09-14T00:00:00Z": 0.0, "2025-09-15T00:00:00Z": 0.0, "2025-09-16T00:00:00Z": 0.0, "2025-09-17T00:00:00Z": 0.0, "2025-09-18T00:00:00Z": 0.0, "2025-09-19T00:00:00Z": 0.0, "2025-09-20T00:00:00Z": 0.0, "2025-09-21T00:00:00Z": 0.0, "2025-09-22T00:00:00Z": 0.0, "2025-09-23T00:00:00Z": 0.0, "2025-09-24T00:00:00Z": 0.0, "2025-09-25T00:00:00Z": 0.0, "2025-09-26T00:00:00Z": 0.0, "2025-09-27T00:00:00Z": 0.0, "2025-09-28T00:00:00Z": 0.0, "2025-09-30T00:00:00Z": 0.0, "2025-10-01T00:00:00Z": 0.0, "2025-10-02T00:00:00Z": 0.0, "2025-10-03T00:00:00Z": 0.0, "2025-10-04T00:00:00Z": 0.0, "2025-10-05T00:00:00Z": 0.0, "2025-10-06T00:00:00Z": 0.0, "2025-10-07T00:00:00Z": 0.0, "2025-10-08T00:00:00Z": 0, "2025-10-09T00:00:00Z": 0}, "stdev": {"2025-09-10T00:00:00Z": 0.2996384743659499, "2025-09-11T00:00:00Z": 0.4217835608583786, "2025-09-12T00:00:00Z": 0.48480904392469776, "2025-09-13T00:00:00Z": 0.5519831699979253, "2025-09-14T00:00:00Z": 0.6836449366385909, "2025-09-15T00:00:00Z": 0.5772791344241578, "2025-09-16T00:00:00Z": 0.49879087509208164, "2025-09-17T00:00:00Z": 0.5710494882904773, "2025-09-18T00:00:00Z": 0.47281206713402174, "2025-09-19T00:00:00Z": 0.5397050772283568, "2025-09-20T00:00:00Z": 0.6245294514132563, "2025-09-21T00:00:00Z": 0.6804210128289083, "2025-09-22T00:00:00Z": 0.6944088906142988, "2025-09-23T00:00:00Z": 0.41970150563344993, "2025-09-24T00:00:00Z": 0.3834694302700857, "2025-09-25T00:00:00Z": 0.3789662830732043, "2025-09-26T00:00:00Z": 0.503109287861155, "2025-09-27T00:00:00Z": 0.4378406817031671, "2025-09-28T00:00:00Z": 0.459214688817658, "2025-09-30T00:00:00Z": 0.38934798554736716, "2025-10-01T00:00:00Z": 0.346205632386419, "2025-10-02T00:00:00Z": 0.34302545677825946, "2025-10-03T00:00:00Z": 0.6436004501055309, "2025-10-04T00:00:00Z": 0.8056352454342522, "2025-10-05T00:00:00Z": 0.6002012453021701, "2025-10-06T00:00:00Z": 0.47181570590882344, "2025-10-07T00:00:00Z": 0.5313159945604392, "2025-10-08T00:00:00Z": 0, "2025-10-09T00:00:00Z": 0}, "stderr": "0.00033191396261756203", "hist": [["0.0", "1379967"], ["0.49749999999999994", "821488"], ["0.9949999999999999", "404937"], ["1.4924999999999997", "168503"], ["1.9899999999999998", "54128"], ["2.4875", "18491"], ["2.9849999999999994", "5641"], ["3.4824999999999995", "1989"], ["3.9799999999999995", "17"], ["4.477499999999999", "500"]], "errors": {"error_count": 2, "error_days": "['2025-09-29T00:00:00Z', '2025-10-10T00:00:00Z']"}});
305+
306306
// This is the response when the imageStat server fails
307307
if (!data || data === 'null') {
308308
return {
@@ -371,6 +371,49 @@ function ChartingModeOptions(props) {
371371
return rechartsData;
372372
}
373373

374+
function combineData(inputArr) {
375+
if (!inputArr || inputArr.length === 0) return inputArr;
376+
if (inputArr.length === 1) return inputArr[0];
377+
const output = {
378+
ok: true,
379+
body: {
380+
errors: {
381+
error_count: 0,
382+
error_days: [],
383+
},
384+
hist: [],
385+
max: {},
386+
mean: {},
387+
median: {},
388+
min: {},
389+
stderr: 0,
390+
stdev: {},
391+
},
392+
};
393+
if (inputArr.every((dataset) => !dataset.ok)) {
394+
output.ok = false;
395+
output.error = inputArr[0].error;
396+
return output;
397+
}
398+
inputArr?.forEach((dataset) => {
399+
if (dataset.ok && !!dataset.body) {
400+
Object.keys(dataset.body).forEach((key) => {
401+
if (key === 'errors') {
402+
output.body.errors.error_count += dataset.body.errors.error_count;
403+
output.body.errors.error_days.push(...dataset.body.errors.error_days.replaceAll(/('|\[|\])/gi, '').split(', '));
404+
} else if (key === 'hist') {
405+
output.body.hist.push(...dataset.body.hist);
406+
} else if (key === 'stderr') {
407+
output.body.stderr += parseFloat(dataset.body.stderr);
408+
} else {
409+
output.body[key] = { ...output.body[key], ...dataset.body[key] };
410+
}
411+
});
412+
}
413+
});
414+
return output;
415+
}
416+
374417
async function onRequestChartClick() {
375418
if (chartRequestInProgress) return;
376419
updateChartRequestStatus(true);
@@ -389,9 +432,24 @@ function ChartingModeOptions(props) {
389432
});
390433
const requestedLayerSource = layerInfo.projections.geographic.source;
391434
if (requestedLayerSource === 'GIBS:geographic') {
392-
const uriParameters = getImageStatRequestParameters(layerInfo, timeSpanSelection);
393-
const requestURI = getImageStatStatsRequestURL(uriParameters);
394-
const data = await getImageStatData(requestURI);
435+
const numDaysRequested = Math.floor((initialEndDate - initialStartDate) / (1000 * 60 * 60 * 24)) + 1;
436+
const requestsNeeded = Math.ceil(Math.min(MAX_DAYS, numDaysRequested) / STEP_NUM);
437+
const requestsSize = Math.ceil(numDaysRequested / requestsNeeded);
438+
const promises = [];
439+
for (let i = 0; i < requestsNeeded; i += 1) {
440+
const requestStartDate = new Date(initialStartDate.getTime());
441+
requestStartDate.setDate(requestStartDate.getDate() + (i * requestsSize));
442+
let requestEndDate = new Date(requestStartDate.getTime());
443+
requestEndDate.setDate(requestEndDate.getDate() + requestsSize - 1);
444+
if (requestEndDate > initialEndDate) {
445+
requestEndDate = new Date(initialEndDate.getTime());
446+
}
447+
const uriParameters = getImageStatRequestParameters(layerInfo, timeSpanSelection, requestStartDate, requestEndDate);
448+
const requestURI = getImageStatStatsRequestURL(uriParameters);
449+
promises.push(getImageStatData(requestURI));
450+
}
451+
const dataArr = await Promise.all(promises);
452+
const data = combineData(dataArr);
395453

396454
if (!isMounted.current) {
397455
updateChartRequestStatus(false);
@@ -413,7 +471,6 @@ function ChartingModeOptions(props) {
413471
subtitle: layerInfo.subtitle,
414472
unit: unitOfMeasure,
415473
...data.body,
416-
...uriParameters,
417474
};
418475

419476
if (timeSpanSelection === 'range') {
@@ -433,7 +490,7 @@ function ChartingModeOptions(props) {
433490
startDateFormatted,
434491
endDateFormatted,
435492
numRangeDays,
436-
isTruncated: numRangeDays > STEP_NUM,
493+
isTruncated: false,
437494
numPoints,
438495
coordinates: [...bottomLeftLatLong, ...topRightLatLong],
439496
});

0 commit comments

Comments
 (0)