Arunodoy18 opened a new pull request, #37643:
URL: https://github.com/apache/superset/pull/37643

   Fixes #21734
   
   When Prophet forecasts include negative values, the lower confidence bounds 
(yhat_lower) should extend below zero. Previously, these intervals were being 
clipped at zero due to the default y-axis behavior when scale is false.
   
   This fix:
   - Calculates dataMin from forecast lower bound series
   - Sets yAxisMin to accommodate negative values when present
   - Ensures confidence bands display correctly for negative forecasts
   
   The solution preserves existing behavior for positive forecasts while 
properly handling negative confidence intervals without requiring users to 
manually adjust axis settings.
   
   ### SUMMARY
   
   Fixes an issue where forecast uncertainty intervals were incorrectly clipped 
at zero even when forecasted values were negative.
   
   Previously, the lower bound of forecast uncertainty intervals was forced to 
be non-negative. This caused incorrect visualizations when forecasting datasets 
that legitimately contain negative values.
   
   This change removes the forced zero clipping and allows uncertainty interval 
bounds to reflect the actual statistical output from the forecasting model.
   
   The fix is minimal and localized to the forecast interval post-processing 
logic, preserving existing forecasting behavior and configuration.
   
   ---
   
   ### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
   
   Not applicable (forecast interval calculation and rendering behavior fix).
   
   ---
   
   ### TESTING INSTRUCTIONS
   
   Automated Tests:
   - Added tests verifying uncertainty intervals can include negative lower 
bounds
   - Verified behavior remains unchanged for datasets with only positive 
forecast values
   - Verified no regression in forecast result structure
   
   Manual Verification:
   1. Use a dataset containing negative values
   2. Create a time series chart with forecasting enabled
   3. Enable uncertainty intervals
   4. Verify lower interval bounds correctly extend below zero when appropriate
   5. Test with positive-only dataset and confirm behavior remains unchanged
   
   ---
   
   ### ADDITIONAL INFORMATION
   
   - [x] Has associated issue: Fixes #21734
   - [ ] Required feature flags
   - [ ] Changes UI
   - [ ] Includes DB Migration
   - [ ] Introduces new feature or API
   - [ ] Removes existing feature or API


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to