Copilot commented on code in PR #34595: URL: https://github.com/apache/superset/pull/34595#discussion_r2261056657
########## superset-frontend/plugins/plugin-chart-echarts/src/Timeseries/transformProps.ts: ########## @@ -508,11 +509,17 @@ export default function transformProps( }, minorTick: { show: minorTicks }, minInterval: - xAxisType === AxisType.Time && timeGrainSqla + xAxisType === AxisType.Time && timeGrainSqla && !forceMaxInterval ? TIMEGRAIN_TO_TIMESTAMP[ timeGrainSqla as keyof typeof TIMEGRAIN_TO_TIMESTAMP ] : 0, + maxInterval: + xAxisType === 'time' && timeGrainSqla && forceMaxInterval + ? TIMEGRAIN_TO_TIMESTAMP[ + timeGrainSqla as keyof typeof TIMEGRAIN_TO_TIMESTAMP + ] + : undefined, Review Comment: Inconsistent axis type comparison. Line 512 uses `AxisType.Time` (enum) while line 518 uses `'time'` (string literal). This should be consistent to avoid potential bugs. ########## superset-frontend/plugins/plugin-chart-echarts/src/MixedTimeseries/transformProps.ts: ########## @@ -574,11 +575,17 @@ export default function transformProps( }, minorTick: { show: minorTicks }, minInterval: - xAxisType === AxisType.Time && timeGrainSqla + xAxisType === AxisType.Time && timeGrainSqla && !forceMaxInterval ? TIMEGRAIN_TO_TIMESTAMP[ timeGrainSqla as keyof typeof TIMEGRAIN_TO_TIMESTAMP ] : 0, + maxInterval: + xAxisType === 'time' && timeGrainSqla && forceMaxInterval + ? TIMEGRAIN_TO_TIMESTAMP[ + timeGrainSqla as keyof typeof TIMEGRAIN_TO_TIMESTAMP + ] + : undefined, Review Comment: Inconsistent axis type comparison. Line 578 uses `AxisType.Time` (enum) while line 584 uses `'time'` (string literal). This should be consistent to avoid potential bugs. -- 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: notifications-unsubscr...@superset.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: notifications-unsubscr...@superset.apache.org For additional commands, e-mail: notifications-h...@superset.apache.org