-
Notifications
You must be signed in to change notification settings - Fork 16.6k
fix(chart): prevent clipping of negative forecast confidence intervals #37643
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
Code Review Agent Run #c5a522Actionable Suggestions - 0Review Details
Bito Usage GuideCommands Type the following command in the pull request comment and save the comment.
Refer to the documentation for additional commands. Configuration This repository uses Documentation & Help |
superset-frontend/plugins/plugin-chart-echarts/src/Timeseries/transformProps.ts
Show resolved
Hide resolved
superset-frontend/plugins/plugin-chart-echarts/test/Timeseries/transformProps.test.ts
Show resolved
Hide resolved
d7e0dde to
1590ea5
Compare
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.
1590ea5 to
7a03069
Compare
Code Review Agent Run #2038edActionable Suggestions - 0Review Details
Bito Usage GuideCommands Type the following command in the pull request comment and save the comment.
Refer to the documentation for additional commands. Configuration This repository uses Documentation & Help |
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:
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:
Manual Verification:
ADDITIONAL INFORMATION