Skip to content

Conversation

@Arunodoy18
Copy link

@Arunodoy18 Arunodoy18 commented Feb 3, 2026

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

@bito-code-review
Copy link
Contributor

bito-code-review bot commented Feb 3, 2026

Code Review Agent Run #c5a522

Actionable Suggestions - 0
Review Details
  • Files reviewed - 2 · Commit Range: d7e0dde..d7e0dde
    • superset-frontend/plugins/plugin-chart-echarts/src/Timeseries/transformProps.ts
    • superset-frontend/plugins/plugin-chart-echarts/test/Timeseries/transformProps.test.ts
  • Files skipped - 0
  • Tools
    • Eslint (Linter) - ✔︎ Successful
    • Whispers (Secret Scanner) - ✔︎ Successful
    • Detect-secrets (Secret Scanner) - ✔︎ Successful

Bito Usage Guide

Commands

Type the following command in the pull request comment and save the comment.

  • /review - Manually triggers a full AI review.

  • /pause - Pauses automatic reviews on this pull request.

  • /resume - Resumes automatic reviews.

  • /resolve - Marks all Bito-posted review comments as resolved.

  • /abort - Cancels all in-progress reviews.

Refer to the documentation for additional commands.

Configuration

This repository uses Superset You can customize the agent settings here or contact your Bito workspace admin at evan@preset.io.

Documentation & Help

AI Code Review powered by Bito Logo

@Arunodoy18 Arunodoy18 force-pushed the fix-21734-issue-behavior branch from d7e0dde to 1590ea5 Compare February 3, 2026 19:44
Fixes apache#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.
@Arunodoy18 Arunodoy18 force-pushed the fix-21734-issue-behavior branch from 1590ea5 to 7a03069 Compare February 3, 2026 19:45
@rusackas rusackas requested a review from villebro February 3, 2026 20:31
@bito-code-review
Copy link
Contributor

bito-code-review bot commented Feb 3, 2026

Code Review Agent Run #2038ed

Actionable Suggestions - 0
Review Details
  • Files reviewed - 2 · Commit Range: 7a03069..7a03069
    • superset-frontend/plugins/plugin-chart-echarts/src/Timeseries/transformProps.ts
    • superset-frontend/plugins/plugin-chart-echarts/test/Timeseries/transformProps.test.ts
  • Files skipped - 0
  • Tools
    • Eslint (Linter) - ✔︎ Successful
    • Whispers (Secret Scanner) - ✔︎ Successful
    • Detect-secrets (Secret Scanner) - ✔︎ Successful

Bito Usage Guide

Commands

Type the following command in the pull request comment and save the comment.

  • /review - Manually triggers a full AI review.

  • /pause - Pauses automatic reviews on this pull request.

  • /resume - Resumes automatic reviews.

  • /resolve - Marks all Bito-posted review comments as resolved.

  • /abort - Cancels all in-progress reviews.

Refer to the documentation for additional commands.

Configuration

This repository uses Superset You can customize the agent settings here or contact your Bito workspace admin at evan@preset.io.

Documentation & Help

AI Code Review powered by Bito Logo

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Uncertainty intervals of forecast are wrong when it goes negative.

1 participant