Arunodoy18 commented on code in PR #37643:
URL: https://github.com/apache/superset/pull/37643#discussion_r2760741187
##########
superset-frontend/plugins/plugin-chart-echarts/test/Timeseries/transformProps.test.ts:
##########
@@ -1183,3 +1183,51 @@ test('should not apply axis bounds calculation when
seriesType is not Bar for ho
// Should not have explicit max set when seriesType is not Bar
expect(xAxisRaw.max).toBeUndefined();
});
+test('should set yAxis min to accommodate negative forecast lower bounds', ()
=> {
+ // Test for Issue #21734: Forecast uncertainty intervals should not be
clipped at zero
+ const queriesData = [
+ {
+ data: [
+ {
+ __timestamp: BASE_TIMESTAMP,
+ metric__yhat: 10,
+ metric__yhat_lower: -5,
+ metric__yhat_upper: 25,
+ },
+ {
+ __timestamp: BASE_TIMESTAMP + 300000000,
+ metric__yhat: 5,
+ metric__yhat_lower: -10,
+ metric__yhat_upper: 20,
+ },
+ {
+ __timestamp: BASE_TIMESTAMP + 600000000,
Review Comment:
Done
##########
superset-frontend/plugins/plugin-chart-echarts/src/Timeseries/transformProps.ts:
##########
@@ -555,6 +573,17 @@ export default function transformProps(
}
}
+ // For all chart types, if we have negative forecast lower bounds,
+ // ensure yAxisMin accommodates them to prevent clipping at zero
+ if (
Review Comment:
Done
--
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]